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

Perez Kawumi pepe_kawumi at yahoo.co.uk
Wed Sep 19 06:19:53 EDT 2007


Hullo,
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.

Thanks


		
___________________________________________________________ 
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://mail.scipy.org/pipermail/scipy-user/attachments/20070919/eeb45955/attachment.html>


More information about the SciPy-User mailing list