sidpy/base/num_utils.py
def integers_to_consecutive_sections(integer_array):
        """
        Converts a sequence of iterables to tuples with start and stop bounds

        @author: @juanchopanza and @luca from stackoverflow

        Parameters
        ----------
        integer_array : :class:`collections.Iterable`
            iterable object like a :class:`list`

        Returns
        -------
        iterable : :class:`generator`
            Cast to list or similar to use

        Note
        ----
        From https://stackoverflow.com/questions/4628333/converting-a-list-of-integers-into-range-in-python
        """
        integer_array = sorted(set(integer_array))
        for key, group in groupby(enumerate(integer_array),
                                  lambda t: t[1] - t[0]):
            group = list(group)
            yield group[0][1], group[-1][1]

        Converts a sequence of iterables to tuples with start and stop bounds

        @author: @juanchopanza and @luca from stackoverflow

        Parameters
        ----------
        integer_array : :class:`collections.Iterable`
            iterable object like a :class:`list`

        Returns
        -------
        iterable : :class:`generator`
            Cast to list or similar to use

        Note
        ----
        From https://stackoverflow.com/questions/4628333/converting-a-list-of-integers-into-range-in-python
        
Converts a sequence of iterables to tuples with start and stop bounds
Converts a sequence of iterables to tuples with start and stop bounds
def integers_to_consecutive_sections(integer_array):
        integer_array = sorted(set(integer_array))
        for key, group in groupby(enumerate(integer_array),
                                  lambda t: t[1] - t[0]):
            group = list(group)
            yield group[0][1], group[-1][1]
def integers_to_consecutive_sections ( integer_array ) : integer_array = sorted ( set ( integer_array ) ) for key , group in groupby ( enumerate ( integer_array ) , lambda t : t [ 1 ] - t [ 0 ] ) : group = list ( group ) yield group [ 0 ] [ 1 ] , group [ - 1 ] [ 1 ]
Converts a sequence of iterables to tuples with start and stop bounds
Converts a sequence of iterables to tuples with start and stop bounds
"""
        Converts a sequence of iterables to tuples with start and stop bounds

        @author: @juanchopanza and @luca from stackoverflow

        Parameters
        ----------
        integer_array : :class:`collections.Iterable`
            iterable object like a :class:`list`

        Returns
        -------
        iterable : :class:`generator`
            Cast to list or similar to use

        Note
        ----
        From https://stackoverflow.com/questions/4628333/converting-a-list-of-integers-into-range-in-python
        """
integer_array
author
@juanchopanza and @luca from stackoverflow
Parameters

integer_array : :class:`collections.Iterable`
iterable object like a :class:`list`

Returns

iterable : :class:`generator`
Cast to list or similar to use

Note


@juanchopanza and @luca from stackoverflow Parameters integer_array : : class : ` collections . Iterable ` iterable object like a : class : ` list ` Returns iterable : : class : ` generator ` Cast to list or similar to use Note