odc.geo.roi.roi_pad

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

Pad ROI on each side, with clamping.

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

Return type

Union[NormalizedSlice, Tuple[NormalizedSlice, ...]]