MCPcopy Index your code
hub / github.com/numpy/numpy / rfft2

Function rfft2

numpy/fft/_pocketfft.py:1394–1470  ·  view source on GitHub ↗

Compute the 2-dimensional FFT of a real array. Parameters ---------- a : array Input array, taken to be real. s : sequence of ints, optional Shape of the FFT. .. versionchanged:: 2.0 If it is ``-1``, the whole input is used (no padding/trim

(a, s=None, axes=(-2, -1), norm=None, out=None)

Source from the content-addressed store, hash-verified

1392
1393@array_function_dispatch(_fftn_dispatcher)
1394def rfft2(a, s=None, axes=(-2, -1), norm=None, out=None):
1395 """
1396 Compute the 2-dimensional FFT of a real array.
1397
1398 Parameters
1399 ----------
1400 a : array
1401 Input array, taken to be real.
1402 s : sequence of ints, optional
1403 Shape of the FFT.
1404
1405 .. versionchanged:: 2.0
1406
1407 If it is ``-1``, the whole input is used (no padding/trimming).
1408
1409 .. deprecated:: 2.0
1410
1411 If `s` is not ``None``, `axes` must not be ``None`` either.
1412
1413 .. deprecated:: 2.0
1414
1415 `s` must contain only ``int`` s, not ``None`` values. ``None``
1416 values currently mean that the default value for ``n`` is used
1417 in the corresponding 1-D transform, but this behaviour is
1418 deprecated.
1419
1420 axes : sequence of ints, optional
1421 Axes over which to compute the FFT. Default: ``(-2, -1)``.
1422
1423 .. deprecated:: 2.0
1424
1425 If `s` is specified, the corresponding `axes` to be transformed
1426 must not be ``None``.
1427
1428 norm : {"backward", "ortho", "forward"}, optional
1429 Normalization mode (see `numpy.fft`). Default is "backward".
1430 Indicates which direction of the forward/backward pair of transforms
1431 is scaled and with what normalization factor.
1432
1433 .. versionadded:: 1.20.0
1434
1435 The "backward", "forward" values were added.
1436
1437 out : complex ndarray, optional
1438 If provided, the result will be placed in this array. It should be
1439 of the appropriate shape and dtype for the last inverse transform.
1440 incompatible with passing in all but the trivial ``s``).
1441
1442 .. versionadded:: 2.0.0
1443
1444 Returns
1445 -------
1446 out : ndarray
1447 The result of the real 2-D FFT.
1448
1449 See Also
1450 --------
1451 rfftn : Compute the N-dimensional discrete Fourier Transform for real

Callers

nothing calls this directly

Calls 1

rfftnFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…