[Numpy-discussion] how to use argsort result?

Emanuele Olivetti olivetti at itc.it
Tue Jul 11 05:57:28 EDT 2006


Wow. I have to study much more indexing. It works pretty well.

Just to help indexing newbie like on using your advice:
A[arange(A.shape[0])[:,newaxis],indexes]

Thanks a lot!

Emanuele

Pau Gargallo wrote:
> here goes a first try:
> 
> A[arange(2)[:,newaxis],indexes]




More information about the NumPy-Discussion mailing list