I\'m trying to access each item in a numpy 2D array.
I\'m used to something like this in Python [[...], [...], [...]]
for row in data: for col in dat
Try np.ndenumerate:
np.ndenumerate
>>> a =numpy.array([[1,2],[3,4]]) >>> for (i,j), value in np.ndenumerate(a): ... print(i, j, value) ... 0 0 1 0 1 2 1 0 3 1 1 4