mlx.core.fft.fftshift

Contents

mlx.core.fft.fftshift#

fftshift(a: array, axes: Optional[Sequence[int]] = None, stream: Optional[Union[Stream, Device]] = None) array#

Shift the zero-frequency component to the center of the spectrum.

Parameters:
  • a (array) – The input array.

  • axes (list(int), optional) – Axes over which to perform the shift. If None, shift all axes.

Returns:

The shifted array with the same shape as the input.

Return type:

array