[SciPy-user] (no subject)

Johann Rohwer jr at sun.ac.za
Mon Aug 20 10:19:46 EDT 2007


On Monday, 20 August 2007, Perez Kawumi wrote:
> Hi all,
> Is there a command in python that sorts the elements of a vector in
> ascending order? Thanks

In [9]: a=numpy.array([3.,2,4,1])

In [10]: a
Out[10]: array([ 3.,  2.,  4.,  1.])

In [11]: a.sort()

In [12]: a
Out[12]: array([ 1.,  2.,  3.,  4.])

Regards
Johann



More information about the SciPy-User mailing list