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. Parameters: x : array_like Array to mask. value : float Masking value.

numpy.ma.masked_less_equal()

numpy.ma.masked_less_equal(x, value, copy=True) [source] Mask an array where less than or equal to a given value. This function is a shortcut to masked_where, with condition = (x <= value). See also masked_where Mask where a condition is met. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_less_equal(a, 2) masked_array(data = [-- -- -- 3], mask = [ True True True False], fill_value=9999

numpy.ma.masked_not_equal()

numpy.ma.masked_not_equal(x, value, copy=True) [source] Mask an array where not equal to a given value. This function is a shortcut to masked_where, with condition = (x != value). See also masked_where Mask where a condition is met. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_not_equal(a, 2) masked_array(data = [-- -- 2 --], mask = [ True True False True], fill_value=999999)

numpy.ma.masked_less()

numpy.ma.masked_less(x, value, copy=True) [source] Mask an array where less than a given value. This function is a shortcut to masked_where, with condition = (x < value). See also masked_where Mask where a condition is met. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_less(a, 2) masked_array(data = [-- -- 2 3], mask = [ True True False False], fill_value=999999)

numpy.ma.masked_inside()

numpy.ma.masked_inside(x, v1, v2, copy=True) [source] Mask an array inside a given interval. Shortcut to masked_where, where condition is True for x inside the interval [v1,v2] (v1 <= x <= v2). The boundaries v1 and v2 can be given in either order. See also masked_where Mask where a condition is met. Notes The array x is prefilled with its filling value. Examples >>> import numpy.ma as ma >>> x = [0.31, 1.2, 0.01, 0.2, -0.4, -1.1] >>> ma.masked_inside(x

numpy.ma.masked_invalid()

numpy.ma.masked_invalid(a, copy=True) [source] Mask an array where invalid values occur (NaNs or infs). This function is a shortcut to masked_where, with condition = ~(np.isfinite(a)). Any pre-existing mask is conserved. Only applies to arrays with a dtype where NaNs or infs make sense (i.e. floating point types), but accepts any array_like object. See also masked_where Mask where a condition is met. Examples >>> import numpy.ma as ma >>> a = np.arange(5, dtype=np.flo

numpy.ma.masked_equal()

numpy.ma.masked_equal(x, value, copy=True) [source] Mask an array where equal to a given value. This function is a shortcut to masked_where, with condition = (x == value). For floating point arrays, consider using masked_values(x, value). See also masked_where Mask where a condition is met. masked_values Mask using floating point equality. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_equal(a, 2) m

numpy.ma.masked_greater_equal()

numpy.ma.masked_greater_equal(x, value, copy=True) [source] Mask an array where greater than or equal to a given value. This function is a shortcut to masked_where, with condition = (x >= value). See also masked_where Mask where a condition is met. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_greater_equal(a, 2) masked_array(data = [0 1 -- --], mask = [False False True True], fill_va

numpy.ma.masked_greater()

numpy.ma.masked_greater(x, value, copy=True) [source] Mask an array where greater than a given value. This function is a shortcut to masked_where, with condition = (x > value). See also masked_where Mask where a condition is met. Examples >>> import numpy.ma as ma >>> a = np.arange(4) >>> a array([0, 1, 2, 3]) >>> ma.masked_greater(a, 2) masked_array(data = [0 1 2 --], mask = [False False False True], fill_value=999999)

numpy.ma.masked_array

numpy.ma.masked_array [source] alias of MaskedArray