for i, j, k in np.array(range(9)).reshape((3, 3)):
print(i, j, k)
0 1 2
3 4 5
6 7 8