I have a 4D np.array of shape (i,j,k,l)and two 1D np.array contain the indexes in the k-axis and l-axis.
For example
idx = np.array([0, 1, 0])
idy = np.array([0, 1, 0])
array = np.arange(0, 16).reshape(2, 2, 2, 2)
array0 = array[0]
array0[:,idx,idy].shape # (2, 3)
array[0,:,idx,idy].shape # (3, 2)
I am wondering why two different indexing will lead to different shapes?