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

Function _flatsequence

numpy/ma/core.py:1800–1809  ·  view source on GitHub ↗

Generates a flattened version of the sequence.

(sequence)

Source from the content-addressed store, hash-verified

1798 return mask
1799
1800 def _flatsequence(sequence):
1801 "Generates a flattened version of the sequence."
1802 try:
1803 for element in sequence:
1804 if hasattr(element, '__iter__'):
1805 yield from _flatsequence(element)
1806 else:
1807 yield element
1808 except TypeError:
1809 yield sequence
1810
1811 mask = np.asarray(mask)
1812 flattened = _flatsequence(_flatmask(mask))

Callers 1

flatten_maskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected