Re: [Numpy-discussion] interleaved indexing

2008-07-18 Thread Stéfan van der Walt
Hi Amir 2008/7/18 Amir <[EMAIL PROTECTED]>: > A very beginner question about indexing: let x be an array where n = > len(x). I would like to create a view y of x such that: > > y[i] = x[i:i+m,...] for each i and a fixed m << n > > so I can do things like numpy.cov(y). With n large, allocating y i

[Numpy-discussion] interleaved indexing

2008-07-18 Thread Amir
A very beginner question about indexing: let x be an array where n = len(x). I would like to create a view y of x such that: y[i] = x[i:i+m,...] for each i and a fixed m << n so I can do things like numpy.cov(y). With n large, allocating y is a problem for me. Currently, I either do for loops in