With the help of
Numpy numpy.ndarray.__xor__() method, we can get the elements that is XOR by the value that is provided as a parameter in
Syntax: ndarray.__xor__($self, value, /)
Example #1 :
In this example we can see that every element is xor by the value that is passed as a parameter in
[3 0 1 6 7]
Example #2 :
[[0 3 2 5 4] [7 4 5 2 3]]
Attention geek! Strengthen your foundations with the Python Programming Foundation Course and learn the basics.
To begin with, your interview preparations Enhance your Data Structures concepts with the Python DS Course.