Compute the N-dimensional inverse discrete Fourier Transform. This function computes the inverse of the N-dimensional discrete Fourier Transform over any number of axes in an M-dimensional array by means of the Fast Fourier Transform (FFT). In other words, ``ifftn(fftn(a)) ==
(a, s=None, axes=None, norm=None)
| 817 | |
| 818 | @array_function_dispatch(_fftn_dispatcher) |
| 819 | def ifftn(a, s=None, axes=None, norm=None): |
| 820 | """ |
| 821 | Compute the N-dimensional inverse discrete Fourier Transform. |
| 822 | |
| 823 | This function computes the inverse of the N-dimensional discrete |
| 824 | Fourier Transform over any number of axes in an M-dimensional array by |
| 825 | means of the Fast Fourier Transform (FFT). In other words, |
| 826 | ``ifftn(fftn(a)) == a`` to within numerical accuracy. |
| 827 | For a description of the definitions and conventions used, see `numpy.fft`. |
| 828 | |
| 829 | The input, analogously to `ifft`, should be ordered in the same way as is |
| 830 | returned by `fftn`, i.e. it should have the term for zero frequency |
| 831 | in all axes in the low-order corner, the positive frequency terms in the |
| 832 | first half of all axes, the term for the Nyquist frequency in the middle |
| 833 | of all axes and the negative frequency terms in the second half of all |
| 834 | axes, in order of decreasingly negative frequency. |
| 835 | |
| 836 | Parameters |
| 837 | ---------- |
| 838 | a : array_like |
| 839 | Input array, can be complex. |
| 840 | s : sequence of ints, optional |
| 841 | Shape (length of each transformed axis) of the output |
| 842 | (``s[0]`` refers to axis 0, ``s[1]`` to axis 1, etc.). |
| 843 | This corresponds to ``n`` for ``ifft(x, n)``. |
| 844 | Along any axis, if the given shape is smaller than that of the input, |
| 845 | the input is cropped. If it is larger, the input is padded with zeros. |
| 846 | if `s` is not given, the shape of the input along the axes specified |
| 847 | by `axes` is used. See notes for issue on `ifft` zero padding. |
| 848 | axes : sequence of ints, optional |
| 849 | Axes over which to compute the IFFT. If not given, the last ``len(s)`` |
| 850 | axes are used, or all axes if `s` is also not specified. |
| 851 | Repeated indices in `axes` means that the inverse transform over that |
| 852 | axis is performed multiple times. |
| 853 | norm : {"backward", "ortho", "forward"}, optional |
| 854 | .. versionadded:: 1.10.0 |
| 855 | |
| 856 | Normalization mode (see `numpy.fft`). Default is "backward". |
| 857 | Indicates which direction of the forward/backward pair of transforms |
| 858 | is scaled and with what normalization factor. |
| 859 | |
| 860 | .. versionadded:: 1.20.0 |
| 861 | |
| 862 | The "backward", "forward" values were added. |
| 863 | |
| 864 | Returns |
| 865 | ------- |
| 866 | out : complex ndarray |
| 867 | The truncated or zero-padded input, transformed along the axes |
| 868 | indicated by `axes`, or by a combination of `s` or `a`, |
| 869 | as explained in the parameters section above. |
| 870 | |
| 871 | Raises |
| 872 | ------ |
| 873 | ValueError |
| 874 | If `s` and `axes` have different length. |
| 875 | IndexError |
| 876 | If an element of `axes` is larger than than the number of axes of `a`. |
nothing calls this directly
no test coverage detected