Table Of Contents
Table Of Contents


mxnet.ndarray.contrib.fft(data=None, compute_size=_Null, out=None, name=None, **kwargs)

Apply 1D FFT to input”


fft is only available on GPU.

Currently accept 2 input data shapes: (N, d) or (N1, N2, N3, d), data can only be real numbers. The output data has shape: (N, 2*d) or (N1, N2, N3, 2*d). The format is: [real0, imag0, real1, imag1, …].


data = np.random.normal(0,1,(3,4))
out = mx.contrib.ndarray.fft(data = mx.nd.array(data,ctx = mx.gpu(0)))

Defined in src/operator/contrib/

  • data (NDArray) – Input data to the FFTOp.

  • compute_size (int, optional, default='128') – Maximum size of sub-batch to be forwarded at one time

  • out (NDArray, optional) – The output NDArray to hold the result.


out – The output of this function.

Return type

NDArray or list of NDArrays