Compute the N-dimensional discrete Fourier Transform for real input. This function computes the N-dimensional discrete Fourier Transform over any number of axes in an M-dimensional real array by means of the Fast Fourier Transform (FFT). By default, all axes are transformed, with
(a, s=None, axes=None, norm=None, out=None)
| 1265 | |
| 1266 | @array_function_dispatch(_fftn_dispatcher) |
| 1267 | def rfftn(a, s=None, axes=None, norm=None, out=None): |
| 1268 | """ |
| 1269 | Compute the N-dimensional discrete Fourier Transform for real input. |
| 1270 | |
| 1271 | This function computes the N-dimensional discrete Fourier Transform over |
| 1272 | any number of axes in an M-dimensional real array by means of the Fast |
| 1273 | Fourier Transform (FFT). By default, all axes are transformed, with the |
| 1274 | real transform performed over the last axis, while the remaining |
| 1275 | transforms are complex. |
| 1276 | |
| 1277 | Parameters |
| 1278 | ---------- |
| 1279 | a : array_like |
| 1280 | Input array, taken to be real. |
| 1281 | s : sequence of ints, optional |
| 1282 | Shape (length along each transformed axis) to use from the input. |
| 1283 | (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.). |
| 1284 | The final element of `s` corresponds to `n` for ``rfft(x, n)``, while |
| 1285 | for the remaining axes, it corresponds to `n` for ``fft(x, n)``. |
| 1286 | Along any axis, if the given shape is smaller than that of the input, |
| 1287 | the input is cropped. If it is larger, the input is padded with zeros. |
| 1288 | |
| 1289 | .. versionchanged:: 2.0 |
| 1290 | |
| 1291 | If it is ``-1``, the whole input is used (no padding/trimming). |
| 1292 | |
| 1293 | If `s` is not given, the shape of the input along the axes specified |
| 1294 | by `axes` is used. |
| 1295 | |
| 1296 | .. deprecated:: 2.0 |
| 1297 | |
| 1298 | If `s` is not ``None``, `axes` must not be ``None`` either. |
| 1299 | |
| 1300 | .. deprecated:: 2.0 |
| 1301 | |
| 1302 | `s` must contain only ``int`` s, not ``None`` values. ``None`` |
| 1303 | values currently mean that the default value for ``n`` is used |
| 1304 | in the corresponding 1-D transform, but this behaviour is |
| 1305 | deprecated. |
| 1306 | |
| 1307 | axes : sequence of ints, optional |
| 1308 | Axes over which to compute the FFT. If not given, the last ``len(s)`` |
| 1309 | axes are used, or all axes if `s` is also not specified. |
| 1310 | |
| 1311 | .. deprecated:: 2.0 |
| 1312 | |
| 1313 | If `s` is specified, the corresponding `axes` to be transformed |
| 1314 | must be explicitly specified too. |
| 1315 | |
| 1316 | norm : {"backward", "ortho", "forward"}, optional |
| 1317 | Normalization mode (see `numpy.fft`). Default is "backward". |
| 1318 | Indicates which direction of the forward/backward pair of transforms |
| 1319 | is scaled and with what normalization factor. |
| 1320 | |
| 1321 | .. versionadded:: 1.20.0 |
| 1322 | |
| 1323 | The "backward", "forward" values were added. |
| 1324 |
no test coverage detected
searching dependent graphs…