I have two large 2-d arrays and I\'d like to find their set difference taking their rows as elements. In Matlab, the code for this would be setdiff(A,B,\'rows\')
I'm not sure what you are going for, but this will get you a boolean array of where 2 arrays are not equal, and will be numpy fast:
import numpy as np
a = np.random.randn(5, 5)
b = np.random.randn(5, 5)
a[0,0] = 10.0
b[0,0] = 10.0
a[1,1] = 5.0
b[1,1] = 5.0
c = ~(a-b==0)
print c
[[False True True True True]
[ True False True True True]
[ True True True True True]
[ True True True True True]
[ True True True True True]]