MCPcopy Index your code
hub / github.com/numpy/numpy / masked_greater_equal

Function masked_greater_equal

numpy/ma/core.py:2035–2059  ·  view source on GitHub ↗

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 as np >>> impor

(x, value, copy=True)

Source from the content-addressed store, hash-verified

2033
2034
2035def masked_greater_equal(x, value, copy=True):
2036 """
2037 Mask an array where greater than or equal to a given value.
2038
2039 This function is a shortcut to ``masked_where``, with
2040 `condition` = (x >= value).
2041
2042 See Also
2043 --------
2044 masked_where : Mask where a condition is met.
2045
2046 Examples
2047 --------
2048 >>> import numpy as np
2049 >>> import numpy.ma as ma
2050 >>> a = np.arange(4)
2051 >>> a
2052 array([0, 1, 2, 3])
2053 >>> ma.masked_greater_equal(a, 2)
2054 masked_array(data=[0, 1, --, --],
2055 mask=[False, False, True, True],
2056 fill_value=999999)
2057
2058 """
2059 return masked_where(greater_equal(x, value), x, copy=copy)
2060
2061
2062def masked_less(x, value, copy=True):

Callers 2

test_testOddFeaturesMethod · 0.90

Calls 2

masked_whereFunction · 0.85
greater_equalFunction · 0.85

Tested by 2

test_testOddFeaturesMethod · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…