slice_of_slice¶
- zixy.utils.slice_of_slice(s1: slice, s2: slice, length: int) slice[source]¶
Compose two slices.
The resulting slice satisfies
a[slice_of_slice(s1, s2, length)] == a[s1][s2]
for some sequence
aof lengthlength.- Parameters:
s1 – The first slice.
s2 – The second slice.
length – The number of elements in the data being sliced.
- Returns:
The combined slice.