fftshift#

pynlo.utility.fft.fftshift(x, axis=-1)[source]#

Shift the origin from the beginning to the center of the array.

This function is used after an fft operation to shift from fft to monotic ordering.

Parameters:
xarray_like

Input array

axisint, optional

The axis over which to shift. The default is the last axis.

Returns:
ndarray

The shifted array.