bundles / scipy latest / scipy / fft / _helper / ifftshift
function
scipy.fft._helper:ifftshift
source: build-install/usr/lib/python3.14/site-packages/scipy/fft/_helper.py:307
Signature
def ifftshift(x, axes = None)Summary
The inverse of fftshift. Although identical for even-length x, the functions differ by one sample for odd-length x.
Parameters
x: array_likeInput array.
axes: int or shape tuple, optionalAxes over which to calculate. Defaults to None, which shifts all axes.
Returns
y: ndarrayThe shifted array.
Examples
import numpy as np freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3) freqs np.fft.ifftshift(np.fft.fftshift(freqs))✓
array([[ 0., 1., 2.],
[ 3., 4., -4.],
[-3., -2., -1.]])
See also
- fftshift
Shift zero-frequency component to the center of the spectrum.
Aliases
scipy.fft.ifftshift