According to docs numpy, the default is to index arrays first by row, and by column:
a = numpy.arange(6).reshape(3,2)
[[0 1]
[2 3]
[4 5]]
print a[0][1] # is 1
I want to index an array using a geometrically oriented legend a[x][y], both in the x and y axis. How to change the indexing order without changing the shape of the array to a[0][1]return 2?
source
share