parse_array_slices_Nd(key: Union[tuple, slice], extent: Box, dims: int = 3, h_dim: int = -3, w_dim: int = -2) Tuple[Box, List[Optional[Any]]][source]#

Parse multi-dim array-indexing inputs into a Box and slices.

  • key (Union[tuple, slice]) – Input to __getitem__.

  • extent (Box) – Extent of the raster/label source being indexed.

  • dims (int) – Total available indexable dims. Defaults to 3.

  • h_dim (int) – Index of height dim. Defaults to -3.

  • w_dim (int) – Index of width dim. Defaults to -2.


A Box representing the h and w slices and a list

containing slices/index-values for all the dims.

Return type

Tuple[Box, list]