I'm using np.nonzero() and i dont understand the return
I try
for groupPosition in np.nonzero(groupMatrix):
print groupPosition
and return [0 0 1 2 3 3 3]
for groupPosition in zip(np.nonzero(groupMatrix)):
print groupPosition
and return (array([0, 1, 0, 3, 0, 1, 3]),)
groupMatrix:
[[ 1. 1. 0. 0.]
[ 1. 0. 0. 0.]
[ 0. 0. 0. 2.]
[ 3. 3. 0. 2.]]
But don't return the position like a (0, 0)