sidpy.base.num_utils.integers_to_slices

sidpy.base.num_utils.integers_to_slices(int_array)[source]

Converts a sequence of iterables to a list of slice objects denoting sequences of consecutive numbers

Parameters:

int_array (collections.Iterable) – iterable object like a list or numpy.ndarray

Returns:

sequences – List of slice objects each denoting sequences of consecutive numbers

Return type:

list