[Numpy-discussion] sorting ndarray

harryos oswald.harry@gmail....
Fri Apr 4 01:02:24 CDT 2008


i have a 1 dim numpy array
D=array( [[ 3. ,  2. ,  1.  , 4. ,  5.  , 1.5,  2.2]] )
i need to get this sorted in descending order and then access the
elements .
D.sort() will make D as [[ 1.   1.5  2.   2.2  3.   4.   5. ]]
how will i reverse it?
or is there a simpler way?
harry


More information about the Numpy-discussion mailing list