Let's say I've got a matrix like this:
mat1 = np.array([1,0,1], [1,1,0], [0,0,0]);
And I've got another one like this:
mat2 = np.array([0,1,0], [0,0,1], [1,1,1]);
I want to detect if something like
np.add(mat1, mat2);
has only 1's or 0's, namely some 1's and some 0's, all 0's, or all 1's.
n.b. - Comment your code.