![]() |
VOOZH | about |
The numpy.not_equal() checks whether two element are unequal or not.
Syntax :
numpy.not_equal(x1, x2[, out])Parameters :
x1, x2 : [array_like]Input Array whose elements we want to check
out : [ndarray, optional]Output array that returns True/False.
A placeholder the same shape as x1 to store the result.
Return :
Boolean array Code 1 :
Output :
Not equal :
[False True]
Not equal :
[[False True]
[False True]]
Code 2 :
Output :
Comparing complex with int using .not_equal() : [ True False]Code 3 :
Output :
Comparing float with int using .not_equal() : [ True True]