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)
| 163 | |
| 164 | @array_function_dispatch(_binary_op_dispatcher) |
| 165 | def 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) |
no outgoing calls
searching dependent graphs…