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 by sqrt(n). If scale is ‘n’, the matrix is divided by n. If scale 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:

(cupy.ndarray)

Notes

When scale is None, multiplying a vector by the matrix returned by dft is mathematically equivalent to (but much less efficient than) the calculation performed by scipy.fft.fft.