[SciPy-user] Returning the positions of a sorted array

Perez Kawumi pepe_kawumi@yahoo.co...
Wed Sep 19 05:19:53 CDT 2007

Im having problems returning the positions of a sorted array. 

Say I create an array 
a = ([3,5,1])

 then if I use the sort command I get

sort(a) = [1,3,5] 

But what if i want the actual original positions of the sorted array to be returned instead. Is there a command in python that can do this?

I'm looking for an answer of the form [2,0,1] which returns the original positions in a of the sorted array instead.


Win a BlackBerry device from O2 with Yahoo!. Enter now. http://www.yahoo.co.uk/blackberry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/scipy-user/attachments/20070919/eeb45955/attachment.html 

More information about the SciPy-user mailing list