cupyx.scipy.linalg.dft#
- cupyx.scipy.linalg.dft(n, scale=None)[source]#
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).
- Parameters
n (int) – Size the matrix to create.
scale (str, optional) – Must be None, ‘sqrtn’, or ‘n’. If
scale
is ‘sqrtn’, the matrix is divided bysqrt(n)
. Ifscale
is ‘n’, the matrix is divided byn
. Ifscale
is None (default), the matrix is not normalized, and the return value is simply the Vandermonde matrix of the roots of unity.
- Returns
The DFT matrix.
- Return type
Notes
When
scale
is None, multiplying a vector by the matrix returned bydft
is mathematically equivalent to (but much less efficient than) the calculation performed byscipy.fft.fft
.See also