I'm a little confused... I always thought the DFT of a convolution was equal to a product of DFTs, but when I tried this in Python:
from scipy import *
a = [1+0j, 2+0j]
b = [4+0j, 5+0j]
print list(ifft(fft(a) * fft(b)))
print list(convolve(a, b))
I got back:
[(14+0j), (13+0j)]
[(4+0j), (13+0j), (10+0j)]
Why are they not the same thing?
convolve
. $\endgroup$convolve
, which is exactly whatfftconvolve
does. $\endgroup$