numpy 1.22.4 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
rfft2(a, s=None, axes=(-2, -1), norm=None)

Notes

This is really just rfftn with different default behavior. For more details see rfftn .

Parameters

a : array

Input array, taken to be real.

s : sequence of ints, optional

Shape of the FFT.

axes : sequence of ints, optional

Axes over which to compute the FFT.

norm : {"backward", "ortho", "forward"}, optional
versionadded

Normalization mode (see numpy.fft ). Default is "backward". Indicates which direction of the forward/backward pair of transforms is scaled and with what normalization factor.

versionadded

The "backward", "forward" values were added.

Returns

out : ndarray

The result of the real 2-D FFT.

Compute the 2-dimensional FFT of a real array.

See Also

rfftn

Compute the N-dimensional discrete Fourier Transform for real input.

Examples

>>> a = np.mgrid[:5, :5][0]
... np.fft.rfft2(a) array([[ 50. +0.j , 0. +0.j , 0. +0.j ], [-12.5+17.20477401j, 0. +0.j , 0. +0.j ], [-12.5 +4.0614962j , 0. +0.j , 0. +0.j ], [-12.5 -4.0614962j , 0. +0.j , 0. +0.j ], [-12.5-17.20477401j, 0. +0.j , 0. +0.j ]])
See :

Back References

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

numpy.fft.rfftn numpy.fft.irfft2

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


GitHub : /numpy/fft/_pocketfft.py#1208
type: <class 'function'>
Commit: