combine_slices

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.