{ } Raw JSON

bundles / numpy 2.4.4 / numpy / ma / core / masked_not_equal

function

numpy.ma.core:masked_not_equal

source: /numpy/ma/core.py :2105

Signature

def   masked_not_equal ( x value copy = True )

Summary

Mask an array where not equal to a given value.

Extended Summary

This function is a shortcut to masked_where, with condition = (x != value).

Examples

import numpy as np
import numpy.ma as ma
a = np.arange(4)
a
ma.masked_not_equal(a, 2)

See also

masked_where

Mask where a condition is met.

Aliases

  • numpy.ma.masked_not_equal