MCPcopy Create free account
hub / github.com/numpy/numpy / flatten_sequence

Function flatten_sequence

numpy/ma/core.py:2516–2525  ·  view source on GitHub ↗

Flattens a compound of nested iterables.

(iterable)

Source from the content-addressed store, hash-verified

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

Callers 1

flatten_structured_arrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected