Discrete Fourier transform matrix.
Create the matrix that computes the discrete Fourier transform of a sequence. The nth primitive root of unity used to generate the matrix is exp(-2*pi*i/n), where i = sqrt(-1).
n (int) – Size the matrix to create.
scale (str, optional) – Must be None, ‘sqrtn’, or ‘n’. If
scaleis ‘sqrtn’, the matrix is divided by
scaleis ‘n’, the matrix is divided by
scaleis None (default), the matrix is not normalized, and the return value is simply the Vandermonde matrix of the roots of unity.
The DFT matrix.
- Return type
scaleis None, multiplying a vector by the matrix returned by
dftis mathematically equivalent to (but much less efficient than) the calculation performed by