[SciPy-user] reverse an array

Williamson, Ross Ross.Williamson@usap....
Fri Feb 27 21:02:30 CST 2009


Hi everyone

Is there an easy way to reverse an array without converting it to a list?

i.e I'm currently doing:

x = array([0,1,2,3,4])
x = x.tolist()
x.reverse()
x = array(x)

print x : [4,3,2,1,0]

Thanks

Ross


More information about the SciPy-user mailing list