MCPcopy Create free account
hub / github.com/numpy/numpy / less_equal

Function less_equal

numpy/core/defchararray.py:184–206  ·  view source on GitHub ↗

Return (x1 <= x2) element-wise. Unlike `numpy.less_equal`, this comparison is performed by first stripping whitespace characters from the end of the string. This behavior is provided for backward-compatibility with numarray. Parameters ---------- x1, x2 : array_like o

(x1, x2)

Source from the content-addressed store, hash-verified

182
183@array_function_dispatch(_binary_op_dispatcher)
184def less_equal(x1, x2):
185 """
186 Return (x1 <= x2) element-wise.
187
188 Unlike `numpy.less_equal`, this comparison is performed by first
189 stripping whitespace characters from the end of the string. This
190 behavior is provided for backward-compatibility with numarray.
191
192 Parameters
193 ----------
194 x1, x2 : array_like of str or unicode
195 Input arrays of the same shape.
196
197 Returns
198 -------
199 out : ndarray
200 Output array of bools.
201
202 See Also
203 --------
204 equal, not_equal, greater_equal, greater, less
205 """
206 return compare_chararrays(x1, x2, '<=', True)
207
208
209@array_function_dispatch(_binary_op_dispatcher)

Callers 10

__le__Method · 0.90
test_basic_ufuncsMethod · 0.90
__le__Method · 0.70
within_tolFunction · 0.70
bartlettFunction · 0.50
masked_less_equalFunction · 0.50
allcloseFunction · 0.50
test_testUfuncs1Method · 0.50
test_testOddFeaturesMethod · 0.50

Calls 1

compare_chararraysFunction · 0.85

Tested by 4

test_basic_ufuncsMethod · 0.72
test_testUfuncs1Method · 0.40
test_testOddFeaturesMethod · 0.40