maxframe.tensor.fft.ifftshift#

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

The inverse of fftshift. Although identical for even-length x, the functions differ by one sample for odd-length x.

参数:
  • x (array_like) -- 输入张量。

  • axes (int or shape tuple, optional) -- 进行计算的轴。默认为 None,表示对所有轴进行偏移。

返回:

y —— 偏移后的张量。

返回类型:

Tensor

参见

fftshift

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

示例

>>> import maxframe.tensor as mt
>>> freqs = mt.fft.fftfreq(9, d=1./9).reshape(3, 3)
>>> freqs.execute()
array([[ 0.,  1.,  2.],
       [ 3.,  4., -4.],
       [-3., -2., -1.]])
>>> mt.fft.ifftshift(mt.fft.fftshift(freqs)).execute()
array([[ 0.,  1.,  2.],
       [ 3.,  4., -4.],
       [-3., -2., -1.]])