mlx_rs::fft

Function rfft_device

Source
pub fn rfft_device(
    a: impl AsRef<Array>,
    n: impl Into<Option<i32>>,
    axis: impl Into<Option<i32>>,
    stream: impl AsRef<Stream>,
) -> Result<Array>
Expand description

One dimensional discrete Fourier Transform on a real input.

The output has the same shape as the input except along axis in which case it has size `n // 2

  • 1`.

ยงParams

  • a: The input array. If the array is complex it will be silently cast to a real type.
  • n: Size of the transformed axis. The corresponding axis in the input is truncated or padded with zeros to match n. The default value is a.shape[axis] if not specified.
  • axis: Axis along which to perform the FFT. The default is -1 if not specified.