Python wrappers
Public Python APIs implemented by this engine symbol.N-dimensional complex-to-complex DFT (forward).
Computes the discrete Fourier transform of along the requested
axes. This is the entry point invoked by lucid.fft.fftn and
is consumed by Python-side autograd machinery; this function itself
performs no gradient wiring.
Math
For a -dimensional transform over axes of sizes ,
The "backward" normalisation convention is used (no scaling on
forward; division by on inverse).
Shape
out.shape[axes[i]] == n[i] when n is supplied; otherwise
out.shape == a.shape. All other axes retain their input size.
References
Cooley & Tukey, "An Algorithm for the Machine Calculation of Complex Fourier Series" (Math. Comp., 1965).
See Also
ifftn_op : Inverse N-D DFT (backward of fftn).
rfftn_op : Real-input N-D DFT.
Parameters
aTensorImplPtrnvector<int64_t>len(n) == len(axes) must hold; each input axis is cropped or zero-padded to n[i].axesvector<int>Returns
TensorImplPtrC64 tensor with shape equal to a.shape() except that each axes[i] is replaced by n[i] (or unchanged when n is empty).
Raises
LucidErrora is null, rank-0, has an unsupported dtype, or if len(n) != len(axes) when n is non-empty.Notes
FFT bypasses the IBackend dispatcher and calls MLX directly from
both CPU and GPU device paths (see _Detail.h). On Device::CPU
the result is downloaded to host memory after the transform.