dpnp.fft.ifftshift¶
- dpnp.fft.ifftshift(x, axes=None)[source]¶
Inverse shift the zero-frequency component to the center of the spectrum.
Although identical for even-length x, the functions differ by one sample for odd-length x.
For full documentation refer to
numpy.fft.ifftshift.- Parameters:
- x{dpnp.ndarray, usm_ndarray}
Input array.
- axes{None, int, list or tuple of ints}, optional
Axes over which to shift. By default, it shifts over all axes.
Default:
None.
- Returns:
- outdpnp.ndarray
The shifted array.
See also
dpnp.fft.fftshiftShift zero-frequency component to the center of the spectrum.
Examples
>>> import dpnp as np >>> 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.]])