mlx.core.fft.rfftn#
- rfftn(a: array, s: Optional[Sequence[int]] = None, axes: Optional[Sequence[int]] = None, stream: Optional[Union[Stream, Device]] = None) array #
n-dimensional real discrete Fourier Transform.
The output has the same shape as the input except along the dimensions in
axes
in which case it has sizes froms
. The last axis inaxes
is treated as the real axis and will have sizes[-1] // 2 + 1
.- Parameters:
a (array) – The input array. If the array is complex it will be silently cast to a real type.
s (list(int), optional) – Sizes of the transformed axes. The corresponding axes in the input are truncated or padded with zeros to match the sizes in
s
. The default value is the sizes ofa
alongaxes
.axes (list(int), optional) – Axes along which to perform the FFT. The default is
None
in which case the FFT is over the lastlen(s)
axes or all axes ifs
is alsoNone
.
- Returns:
The real DFT of the input along the given axes. The output
- Return type: