MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _to_unmasked_float_array

Function _to_unmasked_float_array

lib/matplotlib/cbook.py:1399–1407  ·  view source on GitHub ↗

Convert a sequence to a float array; if input was a masked array, masked values are converted to nans.

(x)

Source from the content-addressed store, hash-verified

1397
1398
1399def _to_unmasked_float_array(x):
1400 """
1401 Convert a sequence to a float array; if input was a masked array, masked
1402 values are converted to nans.
1403 """
1404 if hasattr(x, 'mask'):
1405 return np.ma.asanyarray(x, float).filled(np.nan)
1406 else:
1407 return np.asanyarray(x, float)
1408
1409
1410def _check_1d(x):

Callers 4

recacheMethod · 0.85
__init__Method · 0.85
_create_closedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…