{ } Raw JSON

bundles / numpy 2.4.4 / numpy / ma / core / MaskedArray / _comparison

function

numpy.ma.core:MaskedArray._comparison

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

Signature

def _comparison(self, other, compare)

Summary

Compare self with other using operator.eq or operator.ne.

Extended Summary

When either of the elements is masked, the result is masked as well, but the underlying boolean data are still set, with self and other considered equal if both are masked, and unequal otherwise.

For structured arrays, all fields are combined, with masked values ignored. The result is masked if all fields were masked, with self and other considered equal only if both were fully masked.

Aliases

  • numpy.ma.MaskedArray._comparison