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

Function less

numpy/core/defchararray.py:236–258  ·  view source on GitHub ↗

Return (x1 < x2) element-wise. Unlike `numpy.greater`, 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 of st

(x1, x2)

Source from the content-addressed store, hash-verified

234
235@array_function_dispatch(_binary_op_dispatcher)
236def less(x1, x2):
237 """
238 Return (x1 < x2) element-wise.
239
240 Unlike `numpy.greater`, this comparison is performed by first
241 stripping whitespace characters from the end of the string. This
242 behavior is provided for backward-compatibility with numarray.
243
244 Parameters
245 ----------
246 x1, x2 : array_like of str or unicode
247 Input arrays of the same shape.
248
249 Returns
250 -------
251 out : ndarray
252 Output array of bools.
253
254 See Also
255 --------
256 equal, not_equal, greater_equal, less_equal, greater
257 """
258 return compare_chararrays(x1, x2, '<', True)
259
260
261def _unary_op_dispatcher(a):

Callers 15

__lt__Method · 0.90
user_array.pyFile · 0.90
test_basic_ufuncsMethod · 0.90
test_minmax_funcMethod · 0.90
__lt__Method · 0.70
less_equalMethod · 0.50
less_equalMethod · 0.50
less_equalMethod · 0.50
less_equalMethod · 0.50
less_equalMethod · 0.50
less_equalMethod · 0.50

Calls 1

compare_chararraysFunction · 0.85

Tested by 6

test_basic_ufuncsMethod · 0.72
test_minmax_funcMethod · 0.72
test_testUfuncs1Method · 0.40
test_testOddFeaturesMethod · 0.40
test_testMinMax2Method · 0.40