On Python, range(3) will return [0,1,2]. Is there an equivalent for multidimensional ranges?
range((3,2)) # [(0,0),(0,1),(1,0),(1,1),(2,0),(2,1)]
In numpy, it's numpy.ndindex. Also have a look at numpy.ndenumerate.
E.g.
import numpy as np for x, y in np.ndindex((3,2)): print(x, y)
This yields:
0 0 0 1 1 0 1 1 2 0 2 1