You are viewing an older version (2.4.3). Go to latest (2.4.4)
{ } Raw JSON

bundles / numpy 2.4.3 / numpy / char / less_equal

_ArrayFunctionDispatcher

numpy.char:less_equal

source: /numpy/_core/defchararray.py :164

Signature

def   less_equal ( x1 x2 )

Summary

Return (x1 <= x2) element-wise.

Extended Summary

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 of str or unicode

Input arrays of the same shape.

Returns

out : ndarray

Output array of bools.

Examples

import numpy as np
x1 = np.array(['a', 'b', 'c'])
np.char.less_equal(x1, 'b')

See also

equal
greater
greater_equal
less
not_equal

Aliases

  • numpy.char.less_equal