### Navigation

- index
- modules |
- next |
- previous |
- SciPy v0.7 Reference Guide (DRAFT) »
- Fourier transforms (`scipy.fftpack`) »

# scipy.fftpack.fftn

`scipy.fftpack.``fftn`(x, shape=None, axes=None, overwrite_x=0)

  fftn(x, shape=None, axes=None, overwrite_x=0) -> y

  Return multi-dimensional discrete Fourier transform of arbitrary type sequence x.

  The returned array contains

  > y[j_1,..,j_d] = sum[k_1=0..n_1-1, ..., k_d=0..n_d-1]
  >   x[k_1,..,k_d] * prod[i=1..d] exp(-sqrt(-1)*2*pi/n_i * j_i * k_i)

  where d = len(x.shape) and n = x.shape. Note that y[..., -j_i, ...] = y[..., n_i-j_i, ...].

  Optional input:
    shape
      Defines the shape of the Fourier transform. If shape is not specified then shape=take(x.shape,axes,axis=0). If shape[i]>x.shape[i] then the i-th dimension is padded with zeros. If shape[i]<x.shape[i], then the i-th dimension is truncated to desired length shape[i].
    axes
      The transform is applied along the given axes of the input array (or the newly constructed array if shape argument was used).
    overwrite_x
      If set to true, the contents of x can be destroyed.
  Notes:
    y == fftn(ifftn(y)) within numerical accuracy.

### Navigation

- index
- modules |
- next |
- previous |
- SciPy v0.7 Reference Guide (DRAFT) »
- Fourier transforms (`scipy.fftpack`) »