|
From: Robert K. <rk...@uc...> - 2005-07-18 18:46:04
|
Egg wrote: > Hi all, > > 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)? In [2]: U = arange(10) In [3]: U[::-1] Out[3]: array([9, 8, 7, 6, 5, 4, 3, 2, 1, 0]) -- Robert Kern rk...@uc... "In the fields of hell where the grass grows high Are the graves of dreams allowed to die." -- Richard Harter |