numpy.ma.masked_values()

numpy.ma.masked_values

numpy.ma.masked_values(x, value, rtol=1e-05, atol=1e-08, copy=True, shrink=True) [source]

Mask using floating point equality.

Return a MaskedArray, masked where the data in array x are approximately equal to value, i.e. where the following condition is True

(abs(x - value) <= atol+rtol*abs(value))

The fill_value is set to value and the mask is set to nomask if possible. For integers, consider using masked_equal.

登录查看完整内容