Can someone explain this behavior?
>>> M = np.zeros((1,500,10))
>>> M.shape
(1, 500, 10)
>>> M[0,:,5:10].shape
(500, 5)
>>> M[0,:,np.arange(5,10)].shape
(5, 500)
Why are the axes flipped when indexing with an array instead of directly?
Can someone explain this behavior?
>>> M = np.zeros((1,500,10))
>>> M.shape
(1, 500, 10)
>>> M[0,:,5:10].shape
(500, 5)
>>> M[0,:,np.arange(5,10)].shape
(5, 500)
Why are the axes flipped when indexing with an array instead of directly?