bundles / numpy 2.4.4 / numpy / fft / rfft2
_ArrayFunctionDispatcher
numpy.fft:rfft2
source: /numpy/fft/_pocketfft.py :1393
Signature
def rfft2 ( a , s = None , axes = (-2, -1) , norm = None , out = None ) Summary
Compute the 2-dimensional FFT of a real array.
Parameters
a: arrayInput array, taken to be real.
s: sequence of ints, optionalShape of the FFT.
axes: sequence of ints, optionalAxes over which to compute the FFT. Default:
(-2, -1).norm: {"backward", "ortho", "forward"}, optionalNormalization mode (see numpy.fft). Default is "backward". Indicates which direction of the forward/backward pair of transforms is scaled and with what normalization factor.
out: complex ndarray, optionalIf provided, the result will be placed in this array. It should be of the appropriate shape and dtype for the last inverse transform. incompatible with passing in all but the trivial
s).
Returns
out: ndarrayThe result of the real 2-D FFT.
Notes
This is really just rfftn with different default behavior. For more details see rfftn.
Examples
import numpy as np a = np.mgrid[:5, :5][0] np.fft.rfft2(a)✓
See also
- rfftn
Compute the N-dimensional discrete Fourier Transform for real input.
Aliases
-
numpy.fft.rfft2