bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / ma / core / masked_equal
function
numpy.ma.core:masked_equal
source: build-install/usr/lib/python3.14/site-packages/numpy/ma/core.py :2132
Signature
def masked_equal ( x , value , copy = True ) Summary
Mask an array where equal to a given value.
Extended Summary
Return a MaskedArray, masked where the data in array x are equal to value. The fill_value of the returned MaskedArray is set to value.
For floating point arrays, consider using masked_values(x, value).
Examples
import numpy as np import numpy.ma as ma a = np.arange(4) a ma.masked_equal(a, 2)
See also
- masked_values
Mask using floating point equality.
- masked_where
Mask where a condition is met.
Aliases
-
numpy.ma.masked_equal