FFTW producing different results from numpy.fft

FFTW claims: “FFTW computes an unnormalized DFT”

That is, for ifft they compute enter image description here

However, as stated on for instance wikipedia, the inverse DFT is defined as enter image description here

So the fftw output is in fact incorrect and needs to be scaled.

There is no standard for normalization at least in the electrical engineering community. None of these is “wrong”, you just need to know what each library is computing and deal with it.

Never mind. I’ve found the answer. Apparently, FFTW handles normalization differently from numpy by a normalization factor. If I multiply numpys ifft by N, I get the same result as with FFTW.

This opens up another question: which one of them is skipping the normalization in the forward transform? And why? This seems like very inconsistent behaviour.

Read more here: Source link