Is there a less verbose alternative to this:
for x in xrange(array.shape[0]): for y in xrange(array.shape[1]): do_stuff(x, y)
I
see nditer
import numpy as np Y = np.array([3,4,5,6]) for y in np.nditer(Y, op_flags=['readwrite']): y += 3 Y == np.array([6, 7, 8, 9])
y = 3 would not work, use y *= 0 and y += 3 instead.
y = 3
y *= 0
y += 3