bundles / numpy 2.4.4 / numpy / ma / extras / isin
function
numpy.ma.extras:isin
source: /numpy/ma/extras.py :1434
Signature
def isin ( element , test_elements , assume_unique = False , invert = False ) Summary
Calculates element in test_elements, broadcasting over element only.
Extended Summary
The output is always a masked array of the same shape as element. See numpy.isin for more details.
Examples
import numpy as np element = np.ma.array([1, 2, 3, 4, 5, 6]) test_elements = [0, 2] np.ma.isin(element, test_elements)✓
See also
- in1d
Flattened version of this function.
- numpy.isin
Equivalent function for ndarrays.
Aliases
-
numpy.ma.isin