HTTP/1.1 301 Moved Permanently
Date: Sun, 20 Jul 2025 09:33:18 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: Sun, 20 Jul 2025 09:33:18 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: Sun, 20 Jul 2025 09:43:18 GMT
cache-control: max-age=600
report-to: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=teF9Sb1NNAdRR7aNHytZ%2FkmlV0QMzxYSmDgYpj9kQx1JGH5BwLv%2Bu5yJGm5NLplUyxRyPIWYFwp8PEN9VUthdSrYmV2t61sX%2Fg%3D%3D"}]}
x-proxy-cache: MISS
x-github-request-id: A692:08E7:DEDFB:113C72:687CB7DE
nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800}
age: 0
via: 1.1 varnish
x-served-by: cache-bom4746-BOM
x-cache: MISS
x-cache-hits: 0
x-timer: S1753003998.347874,VS0,VE197
vary: Accept-Encoding
x-fastly-request-id: 399063ef7c881d8afad300f22d4dadc2fb6788db
cf-cache-status: DYNAMIC
content-encoding: gzip
cf-ray: 962174cd5f24441e-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.]])