Flattens a compound of nested iterables.
(iterable)
| 2514 | """ |
| 2515 | |
| 2516 | def flatten_sequence(iterable): |
| 2517 | """ |
| 2518 | Flattens a compound of nested iterables. |
| 2519 | |
| 2520 | """ |
| 2521 | for elm in iter(iterable): |
| 2522 | if hasattr(elm, '__iter__'): |
| 2523 | yield from flatten_sequence(elm) |
| 2524 | else: |
| 2525 | yield elm |
| 2526 | |
| 2527 | a = np.asanyarray(a) |
| 2528 | inishape = a.shape |
no outgoing calls
no test coverage detected