numpy FAQ (wizard) Re: [MATRIX-SIG] array([0,1,2,3]).reverse()
Daniel Michelson
Daniel.Michelson@smhi.se
Mon, 18 Aug 1997 16:40:23 +0200
Hej,
> > Try:
> >
> > a =3D array([0,1,2,3])
> > b =3D a[::-1]
> > b # should give [3,2,1,0]
It does for me:
>>> a =3D array([0,1,2,3])
>>> b =3D a[::-1]
>>> b
3 2 1 0
>>> a
0 1 2 3
best, -d
+------------------+--------------------------------------------------+
| | Daniel B. Michelson |
| /\ |\ /| | | | | Swedish Meteorological and Hydrological Institute|
| \ | \/ | |__| | | S-601 76 Norrk=F6ping, Sweden |=
| \ | | | | | | Telephone: +46 11 - 15 84 94 |
| \/ | | | | | | Telefax: +46 11 - 17 02 07 |
| | Internet: Daniel.Michelson@smhi.se |
+------------------+--------------------------------------------------+
_______________
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
_______________