Re: [Numpy-discussion] fiddling the strides of an array

2006-11-19 Thread A. M. Archibald
On 19/11/06, Filip Wasilewski <[EMAIL PROTECTED]> wrote: > On 11/19/06, A. M. Archibald <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I have a function that would like to be able to take an array, look at > > its 'strides' and 'shape' tuples, and fabricate another array that is > > similar to the firs

Re: [Numpy-discussion] fiddling the strides of an array

2006-11-19 Thread Filip Wasilewski
On 11/19/06, A. M. Archibald <[EMAIL PROTECTED]> wrote: > Hi, > > I have a function that would like to be able to take an array, look at > its 'strides' and 'shape' tuples, and fabricate another array that is > similar to the first but has the adjusted values. > > For a simple example: > > def fidd

[Numpy-discussion] fiddling the strides of an array

2006-11-19 Thread A. M. Archibald
Hi, I have a function that would like to be able to take an array, look at its 'strides' and 'shape' tuples, and fabricate another array that is similar to the first but has the adjusted values. For a simple example: def fiddle(a): strides = list(a.strides) strides[0]*=2 shape = list