Return (x1 != x2) element-wise. Unlike `numpy.not_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
(x1, x2)
| 94 | |
| 95 | @array_function_dispatch(_binary_op_dispatcher) |
| 96 | def not_equal(x1, x2): |
| 97 | """ |
| 98 | Return (x1 != x2) element-wise. |
| 99 | |
| 100 | Unlike `numpy.not_equal`, this comparison is performed by first |
| 101 | stripping whitespace characters from the end of the string. This |
| 102 | behavior is provided for backward-compatibility with numarray. |
| 103 | |
| 104 | Parameters |
| 105 | ---------- |
| 106 | x1, x2 : array_like of str or unicode |
| 107 | Input arrays of the same shape. |
| 108 | |
| 109 | Returns |
| 110 | ------- |
| 111 | out : ndarray |
| 112 | Output array of bools. |
| 113 | |
| 114 | See Also |
| 115 | -------- |
| 116 | equal, greater_equal, less_equal, greater, less |
| 117 | |
| 118 | Examples |
| 119 | -------- |
| 120 | >>> import numpy as np |
| 121 | >>> x1 = np.array(['a', 'b', 'c']) |
| 122 | >>> np.char.not_equal(x1, 'b') |
| 123 | array([ True, False, True]) |
| 124 | |
| 125 | """ |
| 126 | return compare_chararrays(x1, x2, '!=', True) |
| 127 | |
| 128 | |
| 129 | @array_function_dispatch(_binary_op_dispatcher) |
no outgoing calls
searching dependent graphs…