jax.numpy.fft.fftfreq

Contents

jax.numpy.fft.fftfreq#

jax.numpy.fft.fftfreq(n, d=1.0, *, dtype=None, device=None)[source]#

Return sample frequencies for the discrete Fourier transform.

JAX implementation of numpy.fft.fftfreq(). Returns frequencies appropriate for use with the outputs of fft() and ifft().

Parameters:
  • n (int) – length of the FFT window

  • d (ArrayLike) – optional scalar sample spacing (default: 1.0)

  • dtype (DTypeLike | None | None) – optional dtype of returned frequencies. If not specified, JAX’s default floating point dtype will be used.

  • device (xla_client.Device | Sharding | None | None) – optional Device or Sharding to which the created array will be committed.

Returns:

Array of sample frequencies, length n.

Return type:

Array

See also