ma.
masked_less_equal
屏蔽小于或等于给定值的数组。
此函数是 masked_where 用 condition =(x<=值)。
masked_where
参见
满足条件的遮罩。
实例
>>> 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=999999)