-
numpy.not_equal(x1, x2[, out]) =
-
Return (x1 != x2) element-wise.
Parameters: x1, x2 : array_like
Input arrays.
out : ndarray, optional
A placeholder the same shape as
x1
to store the result. Seedoc.ufuncs
(Section ?Output arguments?) for more details.Returns: not_equal : ndarray bool, scalar bool
For each element in
x1, x2
, return True ifx1
is not equal tox2
and False otherwise.See also
Examples
12345>>> np.not_equal([
1.
,
2.
], [
1.
,
3.
])
array([
False
,
True
], dtype
=
bool
)
>>> np.not_equal([
1
,
2
], [[
1
,
3
],[
1
,
4
]])
array([[
False
,
True
],
[
False
,
True
]], dtype
=
bool
)
numpy.not_equal()

2025-01-10 15:47:30
Please login to continue.