[Numpy-discussion] Normalization of ifft

Michael Gilbert michael.s.gilbert@gmail....
Thu Mar 26 20:17:57 CDT 2009

On Thu, 26 Mar 2009 16:56:13 -0700 Lutz Maibaum wrote:

> Hello,
> I just started to use python and numpy for some numerical analysis. I
> have a question about the definition of the inverse Fourier transform.
> The user gives the formula (p.180)
>   x[m] = Sum_k X[k] exp(j 2pi k m / n)
> where X[k] are the Fourier coefficients, and n is the length of the arrays.
> The online documentation
> (http://docs.scipy.org/doc/numpy/reference/routines.fft.html), on the
> other hand, states that there is an additional factor of 1/n, which is
> required to make ifft() the inverse of fft(). Is this a misprint in
> the user guide?

this documentation is saying that the difference between the equations
for the fft and ifft is a factor of 1/n (not the numpy implementations).
if you do 

  output = numpy.ifft( numpy.fft( input ) )

and you get output = input, then the normalizations are appropriately

the "correct" normalization (from a mathemetician viewpoint) is actually
1/sqrt (n) so that the fft is the same function as the ifft, but
computer implementations tend not to do this since the sqrt takes a lot
more operations than plain old 1/n.


More information about the Numpy-discussion mailing list