MCPcopy Create free account
hub / github.com/numpy/numpy / not_equal

Function not_equal

numpy/core/defchararray.py:131–153  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

129
130@array_function_dispatch(_binary_op_dispatcher)
131def not_equal(x1, x2):
132 """
133 Return (x1 != x2) element-wise.
134
135 Unlike `numpy.not_equal`, this comparison is performed by first
136 stripping whitespace characters from the end of the string. This
137 behavior is provided for backward-compatibility with numarray.
138
139 Parameters
140 ----------
141 x1, x2 : array_like of str or unicode
142 Input arrays of the same shape.
143
144 Returns
145 -------
146 out : ndarray
147 Output array of bools.
148
149 See Also
150 --------
151 equal, greater_equal, less_equal, greater, less
152 """
153 return compare_chararrays(x1, x2, '!=', True)
154
155
156@array_function_dispatch(_binary_op_dispatcher)

Callers 7

__ne__Method · 0.90
test_basic_ufuncsMethod · 0.90
__ne__Method · 0.70
masked_not_equalFunction · 0.50
test_testUfuncs1Method · 0.50
test_testOddFeaturesMethod · 0.50

Calls 1

compare_chararraysFunction · 0.85

Tested by 4

test_basic_ufuncsMethod · 0.72
test_testUfuncs1Method · 0.40
test_testOddFeaturesMethod · 0.40