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)
| 197 | |
| 198 | @array_function_dispatch(_binary_op_dispatcher) |
| 199 | def greater(x1, x2): |
| 200 | """ |
| 201 | Return (x1 > x2) element-wise. |
| 202 | |
| 203 | Unlike `numpy.greater`, this comparison is performed by first |
| 204 | stripping whitespace characters from the end of the string. This |
| 205 | behavior is provided for backward-compatibility with numarray. |
| 206 | |
| 207 | Parameters |
| 208 | ---------- |
| 209 | x1, x2 : array_like of str or unicode |
| 210 | Input arrays of the same shape. |
| 211 | |
| 212 | Returns |
| 213 | ------- |
| 214 | out : ndarray |
| 215 | Output array of bools. |
| 216 | |
| 217 | See Also |
| 218 | -------- |
| 219 | equal, not_equal, greater_equal, less_equal, less |
| 220 | |
| 221 | Examples |
| 222 | -------- |
| 223 | >>> import numpy as np |
| 224 | >>> x1 = np.array(['a', 'b', 'c']) |
| 225 | >>> np.char.greater(x1, 'b') |
| 226 | array([False, False, True]) |
| 227 | |
| 228 | """ |
| 229 | return compare_chararrays(x1, x2, '>', True) |
| 230 | |
| 231 | |
| 232 | @array_function_dispatch(_binary_op_dispatcher) |
no outgoing calls
searching dependent graphs…