[Numpy-discussion] moving window product

Keith Goodman kwgoodman@gmail....
Mon Mar 21 14:00:31 CDT 2011


On Mon, Mar 21, 2011 at 11:27 AM, Brent Pedersen <bpederse@gmail.com> 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 convolve speed.

>> import h5py
>> import time
>> f = h5py.File('speed.h5py')
>> a = np.random.rand(200000)
>> t1 = time.time(); f['a'] = a; b = f['a'][:]; t2 = time.time()
>> print "%0.2f ms" % (1000*(t2 - t1))
3.30 ms


More information about the NumPy-Discussion mailing list