NumPy | not_equal method
not_equal(~) method performs an element-wise not-equal (!=) comparison given two arrays.
The first input array.
The second input array.
Numpy array |
Instead of creating a new array, you can place the computed mean into the array specified by
Values that are flagged as False will be ignored, that is, their original value will be uninitialized. If you specified the
out parameter, the behavior is slightly different - the original value will be kept intact.
a is a scalar, then a single boolean is returned. Otherwise, a Numpy array of booleans is returned.
np.not_equal([1,4], [2,3])array([ True, True])