odc.geo.roi.roi_pad

odc.geo.roi.roi_pad(roi: Union[slice, int, odc.geo.types.NormalizedSlice], pad: int, shape: int) odc.geo.types.NormalizedSlice[source]
odc.geo.roi.roi_pad(roi: Tuple[Union[slice, int, odc.geo.types.NormalizedSlice], ...], pad: int, shape: Tuple[int, ...]) Tuple[odc.geo.types.NormalizedSlice, ...]

Pad ROI on each side, with clamping.

Returned ROI is guaranteed to be within (0,..) -> shape.

Return type

Union[NormalizedSlice, Tuple[NormalizedSlice, …]]