As we know, FFT inverse of (FFT(A) elementwise multiplied with FFT(B))
may be the same as the convolution of A and B.
However, if I do this in Python:
import numpy as np
import scipy
c = scipy.fft.fft([3, 4, 1, 2])
d = scipy.fft.fft([2, 5, 4, 9])
print(scipy.fft.ifft((c * d)))
# [56.+0.j 40.+0.j 52.+0.j 52.-0.j]
print(np.convolve([3, 4, 1, 2], [2, 5, 4, 9]))
# [ 6 23 34 52 50 17 18]
Why are the values different?
2