Compute the N-dimensional discrete Fourier Transform. This function computes the *N*-dimensional discrete Fourier Transform over any number of axes in an *M*-dimensional array by means of the Fast Fourier Transform (FFT). Parameters ---------- a : array_like In
(a, s=None, axes=None, norm=None)
| 714 | |
| 715 | @array_function_dispatch(_fftn_dispatcher) |
| 716 | def fftn(a, s=None, axes=None, norm=None): |
| 717 | """ |
| 718 | Compute the N-dimensional discrete Fourier Transform. |
| 719 | |
| 720 | This function computes the *N*-dimensional discrete Fourier Transform over |
| 721 | any number of axes in an *M*-dimensional array by means of the Fast Fourier |
| 722 | Transform (FFT). |
| 723 | |
| 724 | Parameters |
| 725 | ---------- |
| 726 | a : array_like |
| 727 | Input array, can be complex. |
| 728 | s : sequence of ints, optional |
| 729 | Shape (length of each transformed axis) of the output |
| 730 | (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.). |
| 731 | This corresponds to ``n`` for ``fft(x, n)``. |
| 732 | Along any axis, if the given shape is smaller than that of the input, |
| 733 | the input is cropped. If it is larger, the input is padded with zeros. |
| 734 | if `s` is not given, the shape of the input along the axes specified |
| 735 | by `axes` is used. |
| 736 | axes : sequence of ints, optional |
| 737 | Axes over which to compute the FFT. If not given, the last ``len(s)`` |
| 738 | axes are used, or all axes if `s` is also not specified. |
| 739 | Repeated indices in `axes` means that the transform over that axis is |
| 740 | performed multiple times. |
| 741 | norm : {"backward", "ortho", "forward"}, optional |
| 742 | .. versionadded:: 1.10.0 |
| 743 | |
| 744 | Normalization mode (see `numpy.fft`). Default is "backward". |
| 745 | Indicates which direction of the forward/backward pair of transforms |
| 746 | is scaled and with what normalization factor. |
| 747 | |
| 748 | .. versionadded:: 1.20.0 |
| 749 | |
| 750 | The "backward", "forward" values were added. |
| 751 | |
| 752 | Returns |
| 753 | ------- |
| 754 | out : complex ndarray |
| 755 | The truncated or zero-padded input, transformed along the axes |
| 756 | indicated by `axes`, or by a combination of `s` and `a`, |
| 757 | as explained in the parameters section above. |
| 758 | |
| 759 | Raises |
| 760 | ------ |
| 761 | ValueError |
| 762 | If `s` and `axes` have different length. |
| 763 | IndexError |
| 764 | If an element of `axes` is larger than than the number of axes of `a`. |
| 765 | |
| 766 | See Also |
| 767 | -------- |
| 768 | numpy.fft : Overall view of discrete Fourier transforms, with definitions |
| 769 | and conventions used. |
| 770 | ifftn : The inverse of `fftn`, the inverse *n*-dimensional FFT. |
| 771 | fft : The one-dimensional FFT, with definitions and conventions used. |
| 772 | rfftn : The *n*-dimensional FFT of real input. |
| 773 | fft2 : The two-dimensional FFT. |
nothing calls this directly
no test coverage detected