windows_to_slices
windows_to_slices(
windows: collections.abc.Sequence[Any] ,
shape: collections.abc.Sequence[int] ,
)-> ‘tuple[slice, …]’
Turn FiberIO.read_array windows into one slice per axis.
Each window is checked by validate_windows and resolved against its axis’s length, so every slice comes back with explicit non-negative bounds and start <= stop (a reversed window is empty); an axis without a window is taken whole.
Parameters
| Parameter | Description |
|---|---|
| windows |
A (start, stop) half-open sample range, a slice, or Nonefor a whole axis, one per axis in order. Trailing axes may be left out. |
| shape | The array’s shape. |