|
From: Francesc A. <fa...@ca...> - 2005-07-18 18:21:30
|
A Monday 18 July 2005 20:00, Egg va escriure: > I would like to reverse the elements of an array (or vector). If it were= a > regular Python list, I could say L.reverse(). If it were in Matlab (ick), > I could say U(4:-1:1). Can anyone give me a hint on doing this in Numeric > (not Numarray)? >>> import Numeric >>> a=3DNumeric.arange(10) >>> a[::-1] array([9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) (the same works for python lists) Cheers, =2D-=20 >0,0< Francesc Altet =A0 =A0 http://www.carabos.com/ V V C=E1rabos Coop. V. =A0=A0Enjoy Data "-" |