I have multiple numpy 2-d arrays which I want to compare rowwise. The output of my function should be a numpy 2-d array representing all rows of the three inputs arrays. I want to be able to detect the first time that a row occurs, every second or third duplicate row should be flagged as False in the output. It is not possible to have duplicate rows within a single array.
If it is possible I would like to avoid the use of loops, as they slow down the calculation speed.
Example:
array1 = array([[444, 427],
[444, 428],
[444, 429],
[444, 430],
[445, 421]], dtype=uint64)
array2 = array([[446, 427],
[446, 440],
[444, 429],
[444, 432],
[445, 421]], dtype=uint64)
array3 = array([[447, 427],
[446, 441],
[444, 429],
[444, 432],
[445, 421]], dtype=uint64)
# output
array([[True, True, True, True, True],
[ True, True, False, True, False],
[ True, True, False, False, False]], dtype=bool)
Any ideas?