MCPcopy Index your code
hub / github.com/numpy/numpy / _mask_propagate

Function _mask_propagate

numpy/ma/core.py:8211–8223  ·  view source on GitHub ↗

Mask whole 1-d vectors of an array that contain masked values.

(a, axis)

Source from the content-addressed store, hash-verified

8209 return round(a, decimals, out)
8210
8211def _mask_propagate(a, axis):
8212 """
8213 Mask whole 1-d vectors of an array that contain masked values.
8214 """
8215 a = array(a, subok=False)
8216 m = getmask(a)
8217 if m is nomask or not m.any() or axis is None:
8218 return a
8219 a._mask = a._mask.copy()
8220 axes = normalize_axis_tuple(axis, a.ndim)
8221 for ax in axes:
8222 a._mask |= m.any(axis=ax, keepdims=True)
8223 return a
8224
8225
8226# Include masked dot here to avoid import problems in getting it from

Callers 1

dotFunction · 0.85

Calls 5

normalize_axis_tupleFunction · 0.90
getmaskFunction · 0.85
arrayFunction · 0.70
anyMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…