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

Function less_equal

numpy/_core/defchararray.py:165–195  ·  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

163
164@array_function_dispatch(_binary_op_dispatcher)
165def less_equal(x1, x2):
166 """
167 Return (x1 <= x2) element-wise.
168
169 Unlike `numpy.less_equal`, this comparison is performed by first
170 stripping whitespace characters from the end of the string. This
171 behavior is provided for backward-compatibility with numarray.
172
173 Parameters
174 ----------
175 x1, x2 : array_like of str or unicode
176 Input arrays of the same shape.
177
178 Returns
179 -------
180 out : ndarray
181 Output array of bools.
182
183 See Also
184 --------
185 equal, not_equal, greater_equal, greater, less
186
187 Examples
188 --------
189 >>> import numpy as np
190 >>> x1 = np.array(['a', 'b', 'c'])
191 >>> np.char.less_equal(x1, 'b')
192 array([ True, True, False])
193
194 """
195 return compare_chararrays(x1, x2, '<=', True)
196
197
198@array_function_dispatch(_binary_op_dispatcher)

Callers 10

__le__Method · 0.90
test_basic_ufuncsMethod · 0.90
__le__Method · 0.85
iscloseFunction · 0.85
bartlettFunction · 0.85
masked_less_equalFunction · 0.85
allcloseFunction · 0.85
test_testUfuncs1Method · 0.85
test_testOddFeaturesMethod · 0.85

Calls

no outgoing calls

Tested by 4

test_basic_ufuncsMethod · 0.72
test_testUfuncs1Method · 0.68
test_testOddFeaturesMethod · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…