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

Function _mask_propagate

numpy/ma/core.py:7825–7837  ·  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

7823
7824
7825def _mask_propagate(a, axis):
7826 """
7827 Mask whole 1-d vectors of an array that contain masked values.
7828 """
7829 a = array(a, subok=False)
7830 m = getmask(a)
7831 if m is nomask or not m.any() or axis is None:
7832 return a
7833 a._mask = a._mask.copy()
7834 axes = normalize_axis_tuple(axis, a.ndim)
7835 for ax in axes:
7836 a._mask |= m.any(axis=ax, keepdims=True)
7837 return a
7838
7839
7840# 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