dask 2021.10.0

ParametersReturnsBackRef
fftshift(x, axes=None)

This docstring was copied from numpy.fft.fftshift.

Some inconsistencies with the Dask version may exist.

This function swaps half-spaces for all axes listed (defaults to all). Note that y[0] is the Nyquist component only if len(x) is even.

Parameters

x : array_like

Input array.

axes : int or shape tuple, optional

Axes over which to shift. Default is None, which shifts all axes.

Returns

y : ndarray

The shifted array.

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

See Also

ifftshift

The inverse of :None:None:`fftshift`.

Examples

This example is valid syntax, but we were not able to check execution
>>> freqs = np.fft.fftfreq(10, 0.1)  # doctest: +SKIP
... freqs # doctest: +SKIP array([ 0., 1., 2., ..., -3., -2., -1.])
This example is valid syntax, but we were not able to check execution
>>> np.fft.fftshift(freqs)  # doctest: +SKIP
array([-5., -4., -3., -2., -1.,  0.,  1.,  2.,  3.,  4.])

Shift the zero-frequency component only along the second axis:

This example is valid syntax, but we were not able to check execution
>>> freqs = np.fft.fftfreq(9, d=1./9).reshape(3, 3)  # doctest: +SKIP
... freqs # doctest: +SKIP array([[ 0., 1., 2.], [ 3., 4., -4.], [-3., -2., -1.]])
This example is valid syntax, but we were not able to check execution
>>> np.fft.fftshift(freqs, axes=(1,))  # doctest: +SKIP
array([[ 2.,  0.,  1.],
       [-4.,  3.,  4.],
       [-1., -3., -2.]])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

dask.array.fft.ifftshift

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/fft.py#289
type: <class 'function'>
Commit: