I've got a simple 2d numpy array like this
array([[1, 0, 1],
[1, 1, 0],
[0, 1, 1],
[0, 0, 0],
[1, 0, 0]])
What I'm trying to do is multiply each row of the array by itself to form a 3d array, (so that 1*1 = 1 and anything else will be 0, essentailly an and function):
array([[[1,0,1],[1,0,0],[0,0,1],[0,0,0],[1,0,0]],
[[1,0,0],[1,1,0],[0,1,0],[0,0,0],[1,0,0]],
...,
...,
...])