I have two Python arrays with arrays inside:
first = [[0,10],[0,11],[0,12],[0,13]]
second = [[0,10],[0,11]]
and I want to get as a result the array that is in the first one, but not in the other:
difference(first,second)
#returns [[0,12],[0,13]]
right now they are numpy arrays, but a solution with regular ones is also valid.
I tried using np.setdiff1d
but it returned an array with the exclusive ints, not exclusive arrays.
And I tried to iterate through the second array deleting its elements from the first one:
diff = first.view()
for equal in second:
diff = np.delete(diff, np.where(diff == equal))
but it returned similar not useful results