Skip to content

Wrong output when slicing with negative values

import pyotb

a = pyotb.Input('image.tif')  # image has 4 bands

extract = a[:, :, 1:-1]  # this is supposed to extract bands n°2 and n°3
print(extract.shape[-1])  # extract has 4 channels instead of 2...