som/basic_som.py
def split_generator(generator, n):
    """A helper function which splits a generator into multiple generators,
    cutting it off each time after n elements.
    """
    while True:
        part = list(islice(generator, n))
        if len(part) > 0:
            yield part
        if len(part) < n:
            break
A helper function which splits a generator into multiple generators,
    cutting it off each time after n elements.
    
A helper function which splits a generator into multiple generators,
cutting it off each time after n elements.
A helper function which splits a generator into multiple generators cutting it off each time after n elements .
def split_generator(generator, n):
    while True:
        part = list(islice(generator, n))
        if len(part) > 0:
            yield part
        if len(part) < n:
            break
def split_generator ( generator , n ) : while True : part = list ( islice ( generator , n ) ) if len ( part ) > 0 : yield part if len ( part ) < n : break
A helper function which splits a generator into multiple generators,
cutting it off each time after n elements.
A helper function which splits a generator into multiple generators cutting it off each time after n elements .
"""A helper function which splits a generator into multiple generators,
    cutting it off each time after n elements.
    """
generator
n