In the numpy tutorial from Scipy, while teaching fancy indexing of numpy arrays, I got the following explanation diagram.
As no other explanation about this particular array is given there, I have created the array using
a = np.array([[j+i for i in range(0,6)] for j in range(0, 60, 10)])
If I run a[(0,1,2,3,4),(1,2,3,4,5)]
I am getting array([ 1, 12, 23, 34, 45])
, consistent with the picture. But I can not understand how the tuples are getting unpacked to a[0,1] and so on.
I am trying to understand the mechanism of this. An in-depth answer will be much appreciated.