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, out=None)
| 754 | |
| 755 | @array_function_dispatch(_fftn_dispatcher) |
| 756 | def fftn(a, s=None, axes=None, norm=None, out=None): |
| 757 | """ |
| 758 | Compute the N-dimensional discrete Fourier Transform. |
| 759 | |
| 760 | This function computes the *N*-dimensional discrete Fourier Transform over |
| 761 | any number of axes in an *M*-dimensional array by means of the Fast Fourier |
| 762 | Transform (FFT). |
| 763 | |
| 764 | Parameters |
| 765 | ---------- |
| 766 | a : array_like |
| 767 | Input array, can be complex. |
| 768 | s : sequence of ints, optional |
| 769 | Shape (length of each transformed axis) of the output |
| 770 | (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.). |
| 771 | This corresponds to ``n`` for ``fft(x, n)``. |
| 772 | Along any axis, if the given shape is smaller than that of the input, |
| 773 | the input is cropped. If it is larger, the input is padded with zeros. |
| 774 | |
| 775 | .. versionchanged:: 2.0 |
| 776 | |
| 777 | If it is ``-1``, the whole input is used (no padding/trimming). |
| 778 | |
| 779 | If `s` is not given, the shape of the input along the axes specified |
| 780 | by `axes` is used. |
| 781 | |
| 782 | .. deprecated:: 2.0 |
| 783 | |
| 784 | If `s` is not ``None``, `axes` must not be ``None`` either. |
| 785 | |
| 786 | .. deprecated:: 2.0 |
| 787 | |
| 788 | `s` must contain only ``int`` s, not ``None`` values. ``None`` |
| 789 | values currently mean that the default value for ``n`` is used |
| 790 | in the corresponding 1-D transform, but this behaviour is |
| 791 | deprecated. |
| 792 | |
| 793 | axes : sequence of ints, optional |
| 794 | Axes over which to compute the FFT. If not given, the last ``len(s)`` |
| 795 | axes are used, or all axes if `s` is also not specified. |
| 796 | Repeated indices in `axes` means that the transform over that axis is |
| 797 | performed multiple times. |
| 798 | |
| 799 | .. deprecated:: 2.0 |
| 800 | |
| 801 | If `s` is specified, the corresponding `axes` to be transformed |
| 802 | must be explicitly specified too. |
| 803 | |
| 804 | norm : {"backward", "ortho", "forward"}, optional |
| 805 | Normalization mode (see `numpy.fft`). Default is "backward". |
| 806 | Indicates which direction of the forward/backward pair of transforms |
| 807 | is scaled and with what normalization factor. |
| 808 | |
| 809 | .. versionadded:: 1.20.0 |
| 810 | |
| 811 | The "backward", "forward" values were added. |
| 812 | |
| 813 | out : complex ndarray, optional |
nothing calls this directly
no test coverage detected
searching dependent graphs…