HTTP/1.1 301 Moved Permanently
Date: Wed, 23 Jul 2025 07:43:52 GMT
Server: Apache/2.4.39 (Ubuntu)
Location: https://numpy.org/doc/stable/reference/generated/numpy.fft.ifftshift.html
Content-Length: 362
Content-Type: text/html; charset=iso-8859-1
HTTP/2 200
date: Wed, 23 Jul 2025 07:43:53 GMT
content-type: text/html; charset=utf-8
server: cloudflare
x-origin-cache: HIT
last-modified: Mon, 30 Jun 2025 16:50:36 GMT
access-control-allow-origin: *
expires: Wed, 23 Jul 2025 07:53:52 GMT
cache-control: max-age=600
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=wp8tqUw%2BX%2FwPL%2Br89uzJm%2B2fAESGrxGgzC9e1E1k4fzMCpmAh5US%2F5HzVMxaa0uWmwUXOS%2FtNF1FzIoEjlBPM7ovE6YRqnEI6Q%3D%3D"}]}
x-proxy-cache: MISS
x-github-request-id: 2AD8:3CEF0C:67A15:7D30A:688092B8
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
age: 0
via: 1.1 varnish
x-served-by: cache-bom-vanm7210045-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753256633.833643,VS0,VE206
vary: Accept-Encoding
x-fastly-request-id: 0a9ae88a330e6b45882ff99ecf47ddc8d03287ce
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 96398ca2ee174001-BOM
alt-svc: h3=":443"; ma=86400
numpy.fft.ifftshift — NumPy v2.3 Manual
numpy.fft.ifftshift
-
fft.ifftshift(x, axes=None)[source]
The inverse of fftshift
. Although identical for even-length x, the
functions differ by one sample for odd-length x.
- Parameters:
- xarray_like
Input array.
- axesint or shape tuple, optional
Axes over which to calculate. Defaults to None, which shifts all axes.
- Returns:
- yndarray
The shifted array.
See also
fftshift
Shift zero-frequency component to the center of the spectrum.
Examples
>>> import numpy 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.]])