Mon Aug 26 06:07:40 CDT 2013
On 2013-08-21 17:50, Eric Moore wrote:
> Clemens Novak wrote:
>> I've been working on extending the fftpack tutorial page (you can see
>> the current status here:
>> ) and I stumbled across the function fftpack.convolve.convolve .
>> Sorry the blunt question, but what does this function do? From the
>> I'd assume that it calculates the convolution of two sequences (as
>> convolve in scipy.signal does) using the fft (since it is part of
>> fftpack), but appearently it doesn't:
>> import numpy as np
>> import scipy.fftpack.convolve as conv
>> import scipy as sp
>> import scipy.signal as sig
>> x = np.array([1.0, 0.0, 0.0])
>> h = np.array([1.0, 2.0, 3.0])
>> y1 = conv.convolve(x, h)
>> [ 5. -1. -1.]
>> y2 = sig.convolve(x, h)
>> [ 1. 2. 3. 0. 0.]
>> y3 = sp.ifft(sp.fft(x) * sp.fft(h))
>> [ 1.+0.j 2.+0.j 3.+0.j]
>> Does the function extend its first and/or second argument to a
>> sequence and perform then the convolution (I tried some ideas but
>> didn'twork either)? It would be great if someone could please provide
>> some insight...
>> Regards - Clemens
>> SciPy-Dev mailing list
> AFAICT, fftpack.convolve exists in support of pseudo_diffs.py. Look
> there to see some examples.
> SciPy-Dev mailing list
Thanks for the input; I will have a look at the file.
More information about the SciPy-Dev