Could someone explain the following behavior? test = np.random.rand(1000, 10) test.shape (1000, 10) idxs = np.random.randint(0, 10, 1000) idxs.shape (1000,) test[:, idxs].shape (1000, 1000) test[range(test.shape[0]), idxs].shape (1000,) I would expect these to be equivalent. What am I missing? Continue reading...