[Numpy-discussion] is there a sortrows

David Cournapeau david at ar.media.kyoto-u.ac.jp
Sun Dec 21 22:19:44 EST 2008


josef.pktd at gmail.com wrote:
>> I may miss something obvious, but why are you using lexsort at all ? At
>> leat, the first example is easily achieved with sort(x, axis=0) - but
>> maybe you have more complicated examples in mind where you need actual
>> lexical sort:
>>
>> David
>>     
>
> >From the examples that I tried out np.sort, sorts each column
> separately (with axis = 0). If the elements of a row is supposed to
> stay together, then np.sort doesn't work.
>   

You're right, as Robert just mentioned, I totally missed the point of
your example...

David



More information about the NumPy-Discussion mailing list