[Numpy-discussion] Stride of 2 for correlate()

Chris Finley cfinley@u.washington....
Tue Feb 5 16:34:25 CST 2008


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]
   data[2:6] with daub_g2[0:4]
   data[4:8] with daub_g2[0:4]
and so on.

You help is greatly appreciated,


More information about the Numpy-discussion mailing list