xorbits.numpy.fft.ifftshift#

xorbits.numpy.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) – Input array.

  • axes (int or shape tuple, optional) – Axes over which to calculate. Defaults to None, which shifts all axes.

返回

y – The shifted array.

返回类型

ndarray

参见

fftshift

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

实际案例

>>> 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.]])

This docstring was copied from numpy.fft.