I have two different scipy sparse arrays of the same shape (actually in my case, one is a row vector and the other is a column vector). I would like to find the number indices where these two arrays have a common 0.
The solution that I currently have is to use the .nonzero
attribute of both of the arrays, turn those into sets, take the union of those sets, and use the size of that union together with the dimensions of the arrays to find my answer.
Is there a more efficient way of doing this?