numpy.fft.ifftshift

fft.ifftshift(x, axes=None)[源代码]

fftshift . 尽管长度相等 x ,函数在奇数长度上有一个样本的不同。 x .

参数
xarray_like

输入数组。

axesint或shape tuple,可选

要计算的轴。默认为无,移动所有轴。

返回
y恩达雷

移位数组。

参见

fftshift

将零频率分量移到频谱中心。

实例

>>> freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3)
>>> freqs
array([[ 0.,  1.,  2.],
       [ 3.,  4., -4.],
       [-3., -2., -1.]])
>>> np.fft.ifftshift(np.fft.fftshift(freqs))
array([[ 0.,  1.,  2.],
       [ 3.,  4., -4.],
       [-3., -2., -1.]])