Re: [Numpy-discussion] moving window product

2011-03-21 Thread Keith Goodman
On Mon, Mar 21, 2011 at 11:27 AM, Brent Pedersen wrote: > my current use-case is to do this 24 times on arrays of about 200K elements. > file IO is the major bottleneck. Would using h5py or pytables help? I get about 3 ms for a write-read cycle for a 200K array. That's much faster than the convo

Re: [Numpy-discussion] moving window product

2011-03-21 Thread Brent Pedersen
On Mon, Mar 21, 2011 at 11:57 AM, Keith Goodman wrote: > On Mon, Mar 21, 2011 at 10:34 AM, Brent Pedersen wrote: >> On Mon, Mar 21, 2011 at 11:19 AM, Keith Goodman wrote: >>> On Mon, Mar 21, 2011 at 10:10 AM, Brent Pedersen wrote: hi, is there a way to take the product along a 1-d array in

Re: [Numpy-discussion] moving window product

2011-03-21 Thread Warren Weckesser
On Mon, Mar 21, 2011 at 12:10 PM, Brent Pedersen wrote: > hi, is there a way to take the product along a 1-d array in a moving > window? -- similar to convolve, with product in place of sum? > currently, i'm column_stacking the array with offsets of itself into > window_size columns and then taki

Re: [Numpy-discussion] moving window product

2011-03-21 Thread Keith Goodman
On Mon, Mar 21, 2011 at 10:34 AM, Brent Pedersen wrote: > On Mon, Mar 21, 2011 at 11:19 AM, Keith Goodman wrote: >> On Mon, Mar 21, 2011 at 10:10 AM, Brent Pedersen wrote: >>> hi, is there a way to take the product along a 1-d array in a moving >>> window? -- similar to convolve, with product in

Re: [Numpy-discussion] moving window product

2011-03-21 Thread Brent Pedersen
On Mon, Mar 21, 2011 at 11:19 AM, Keith Goodman wrote: > On Mon, Mar 21, 2011 at 10:10 AM, Brent Pedersen wrote: >> hi, is there a way to take the product along a 1-d array in a moving >> window? -- similar to convolve, with product in place of sum? >> currently, i'm column_stacking the array wit

Re: [Numpy-discussion] moving window product

2011-03-21 Thread Keith Goodman
On Mon, Mar 21, 2011 at 10:10 AM, Brent Pedersen wrote: > hi, is there a way to take the product along a 1-d array in a moving > window? -- similar to convolve, with product in place of sum? > currently, i'm column_stacking the array with offsets of itself into > window_size columns and then takin

[Numpy-discussion] moving window product

2011-03-21 Thread Brent Pedersen
hi, is there a way to take the product along a 1-d array in a moving window? -- similar to convolve, with product in place of sum? currently, i'm column_stacking the array with offsets of itself into window_size columns and then taking the product at axis 1. like:: w = np.column_stack(a[i:-windo