datacube.utils.geometry.roi_normalise#

datacube.utils.geometry.roi_normalise(roi, shape)[source]#

Fill in missing .start/.stop, also deal with negative values, which are treated as offsets from the end.

.step parameter is left unchanged.

Example

np.s_[:3, 4: ], (10, 20) -> np._s[0:3, 4:20] np.s_[:3, :-3], (10, 20) -> np._s[0:3, 0:17]