I have a np 3D array of values like:
a = np.array([[[ 1, 2, 3],
[ 0, 5, 6]],
[[ 7, 0, 9],
[10, 0, 12]],
[[ 0, 13, 0],
[-1, 15, 0]]])
you can say that this array consists of 3 frames each frame is (2*3) array
I want to determine the position of zero values of each line in this array:
my expectation is a 2D array like :
OUT=[[2, 1, 2]
,[0, 1, 2]]
where this array determine the frame at which the value is zero in each line along the frame number axis.
could you please help me to do this? np.where works well but only for 2D arrays but here my array is 3D