numpy.ma.masked_where()

numpy.ma.masked_where

numpy.ma.masked_where(condition, a, copy=True) [source]

Mask an array where a condition is met.

Return a as an array masked where condition is True. Any masked values of a or condition are also masked in the output.

Parameters:

condition : array_like

Masking condition. When condition tests floating point values for equality, consider using masked_value