blosc2.get_slice_nchunks(schunk, key)#

Get the unidimensional chunk indexes needed to get a slice of a SChunk or a NDArray.

  • schunk (SChunk or NDArray) – The super-chunk or ndarray container.

  • key (tuple(int, int), int, slice or sequence of slices) – If it is a super-chunk, a tuple with the start and stop of the slice, an integer, or a single slice. If it is a ndarray, sequences of slices (one per dim) are accepted too.


out – An array with the unidimensional chunk indexes.

Return type: