Return (x1 == x2) element-wise. Unlike `numpy.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
(x1, x2)
| 103 | |
| 104 | @array_function_dispatch(_binary_op_dispatcher) |
| 105 | def equal(x1, x2): |
| 106 | """ |
| 107 | Return (x1 == x2) element-wise. |
| 108 | |
| 109 | Unlike `numpy.equal`, this comparison is performed by first |
| 110 | stripping whitespace characters from the end of the string. This |
| 111 | behavior is provided for backward-compatibility with numarray. |
| 112 | |
| 113 | Parameters |
| 114 | ---------- |
| 115 | x1, x2 : array_like of str or unicode |
| 116 | Input arrays of the same shape. |
| 117 | |
| 118 | Returns |
| 119 | ------- |
| 120 | out : ndarray |
| 121 | Output array of bools. |
| 122 | |
| 123 | See Also |
| 124 | -------- |
| 125 | not_equal, greater_equal, less_equal, greater, less |
| 126 | """ |
| 127 | return compare_chararrays(x1, x2, '==', True) |
| 128 | |
| 129 | |
| 130 | @array_function_dispatch(_binary_op_dispatcher) |