Re: [Tutor] about array

2006-12-26 Thread linda.s
On 12/26/06, Alan Gauld <[EMAIL PROTECTED]> wrote: > > "linda.s" <[EMAIL PROTECTED]> wrote > > a > > array([[ 0., 1., 2., 3., 4., 5.], > > [ 6., 7., 8., 9., 10., 11.], > > [ 12., 13., 14., 15., 16., 17.], > > [ 18., 19., 20., 21., 22., 23.], > > [ 24., 25., 26., 27., 28., 29.]]) > > OK, This s

Re: [Tutor] about array

2006-12-26 Thread Alan Gauld
"linda.s" <[EMAIL PROTECTED]> wrote a > array([[ 0., 1., 2., 3., 4., 5.], > [ 6., 7., 8., 9., 10., 11.], > [ 12., 13., 14., 15., 16., 17.], > [ 18., 19., 20., 21., 22., 23.], > [ 24., 25., 26., 27., 28., 29.]]) OK, This sets up your test array. a[1:3,:-1:2] # a[i,j] f

Re: [Tutor] about array

2006-12-25 Thread Luke Paireepinart
Oops, another one where I replied off-list. -- Forwarded message -- From: Luke Paireepinart <[EMAIL PROTECTED]> Date: Dec 26, 2006 12:46 AM Subject: Re: [Tutor] about array To: "linda. s" <[EMAIL PROTECTED]> On 12/26/06, linda.s <[EMAIL PROTECTED]&

[Tutor] about array

2006-12-25 Thread linda.s
When I read the following code, I found it was very hard for me to understand the meaning of a[1:3,:-1:2] for a[i,j] for i=1,2 and j=0,2,4; the same as a[::3,2:-1:2] >>> a array([[ 0., 1., 2., 3., 4., 5.], [ 6., 7., 8., 9., 10., 11.], [ 12., 13., 14., 15., 16., 17.], [ 18., 19., 20., 21., 22., 23