[SciPy-user] (no subject)

Johann Rohwer jr@sun.ac...
Mon Aug 20 09:19:46 CDT 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