[Numpy-discussion] Stride of 2 for correlate()
Chris Finley
cfinley at u.washington.edu
Tue Feb 5 17:34:25 EST 2008
Greetings,
After searching the archives, I was unable to find a good method for
changing the stride of the correlate or convolve routines. I am doing a
Daubechies analysis of some sample data, say data = arange(0:80). The
coefficient array or four floats (say daub_g2[0:4]) is correlated over
the data. However, the product only needs to be calculated for every
other data index.
For example, I need to take the inner product of:
data[0:4] with daub_g2[0:4]
then
data[2:6] with daub_g2[0:4]
then
data[4:8] with daub_g2[0:4]
and so on.
You help is greatly appreciated,
Chris
More information about the NumPy-Discussion
mailing list