mlx.core.fft.rfftfreq

Contents

mlx.core.fft.rfftfreq#

rfftfreq(n: int, d: float = 1.0, stream: Stream | mlx.core.ThreadLocalStream | Device | None = None) array#

Return the discrete Fourier Transform sample frequencies for use with rfft() and irfft().

The returned array contains the non-negative frequency terms in the range [0, floor(n/2)].

Parameters:
  • n (int) – Window length.

  • d (float, optional) – Sample spacing. The default is 1.0.

Returns:

The sample frequencies as a one-dimensional array of type float32.

Return type:

array