You get prettier code with:
for iy, ix in np.ndindex(a.shape):
print(a[iy, ix])
resulting in:
1
2
3
4
5
6
7
8
9
10
11
12
You get prettier code with:
for iy, ix in np.ndindex(a.shape):
print(a[iy, ix])
resulting in:
1
2
3
4
5
6
7
8
9
10
11
12