- glue.utils.array.combine_slices(slice1, slice2, length)[source]¶
Given two slices that can be applied to a 1D array and the length of that array, this returns a new slice which is the one that should be applied to the array instead of slice2 if slice1 has already been applied.
The first slice (only positive step sizes allowed).
The second slice (only positive step sizes allowed).
The length of the array on which the combined slice is to be applied.