bundles / numpy 2.5.0.dev0+git20251130.2de293a / numpy / char / less
_ArrayFunctionDispatcher
numpy.char:less
source: build-install/usr/lib/python3.14/site-packages/numpy/_core/defchararray.py :232
Signature
def less ( x1 , x2 ) Summary
Return (x1 < x2) element-wise.
Extended Summary
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 str or unicodeInput arrays of the same shape.
Returns
out: ndarrayOutput array of bools.
Examples
import numpy as np x1 = np.array(['a', 'b', 'c'])✓
np.char.less(x1, 'b')
✗See also
Aliases
-
numpy.char.less