How can I compare array elements in a numpy.ndarray
?
My ndarray
is like this
array([[ 781, 94],
[ 781, 656],
[1367, 94],
[1367, 656]])
Required Output:
array([781, 94, 656, 1367])
Copyright Notice:Content Author:「SRehman」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/28786354/python-numpy-ndarray-compare