Re: [Numpy-discussion] slices vs. range() over a certain axis

2008-11-15 Thread Robert Kern
On Fri, Nov 14, 2008 at 22:40, David Warde-Farley <[EMAIL PROTECTED]> wrote: > I'm trying to clarify my understanding of how slicing works and how it > differs from specifying a sequence of indices. My question is best > illustrated by an example: > >In [278]: x = zeros((5,50)) > >I

[Numpy-discussion] slices vs. range() over a certain axis

2008-11-14 Thread David Warde-Farley
I'm trying to clarify my understanding of how slicing works and how it differs from specifying a sequence of indices. My question is best illustrated by an example: In [278]: x = zeros((5,50)) In [279]: y = random_integers(5,size=50)-1 The behaviour that I want is produced by