This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# import random | |
def unsafe_unpacker(obj): | |
"""A generator that traverses an arbitrarily nested iterable of iterables. | |
Parameters: | |
obj (iterable): the nested iterables, e.g. a numpy array of lists of tuples | |
Returns: | |
A generator whose items are the ordered collection of any non-iterable found |