Compute the 2-dimensional inverse discrete Fourier Transform. This function computes the inverse of the 2-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, ``ifft2(fft2(a)) == a``
(a, s=None, axes=(-2, -1), norm=None, out=None)
| 1143 | |
| 1144 | @array_function_dispatch(_fftn_dispatcher) |
| 1145 | def ifft2(a, s=None, axes=(-2, -1), norm=None, out=None): |
| 1146 | """ |
| 1147 | Compute the 2-dimensional inverse discrete Fourier Transform. |
| 1148 | |
| 1149 | This function computes the inverse of the 2-dimensional discrete Fourier |
| 1150 | Transform over any number of axes in an M-dimensional array by means of |
| 1151 | the Fast Fourier Transform (FFT). In other words, ``ifft2(fft2(a)) == a`` |
| 1152 | to within numerical accuracy. By default, the inverse transform is |
| 1153 | computed over the last two axes of the input array. |
| 1154 | |
| 1155 | The input, analogously to `ifft`, should be ordered in the same way as is |
| 1156 | returned by `fft2`, i.e. it should have the term for zero frequency |
| 1157 | in the low-order corner of the two axes, the positive frequency terms in |
| 1158 | the first half of these axes, the term for the Nyquist frequency in the |
| 1159 | middle of the axes and the negative frequency terms in the second half of |
| 1160 | both axes, in order of decreasingly negative frequency. |
| 1161 | |
| 1162 | Parameters |
| 1163 | ---------- |
| 1164 | a : array_like |
| 1165 | Input array, can be complex. |
| 1166 | s : sequence of ints, optional |
| 1167 | Shape (length of each axis) of the output (``s[0]`` refers to axis 0, |
| 1168 | ``s[1]`` to axis 1, etc.). This corresponds to `n` for ``ifft(x, n)``. |
| 1169 | Along each axis, if the given shape is smaller than that of the input, |
| 1170 | the input is cropped. If it is larger, the input is padded with zeros. |
| 1171 | |
| 1172 | .. versionchanged:: 2.0 |
| 1173 | |
| 1174 | If it is ``-1``, the whole input is used (no padding/trimming). |
| 1175 | |
| 1176 | If `s` is not given, the shape of the input along the axes specified |
| 1177 | by `axes` is used. See notes for issue on `ifft` zero padding. |
| 1178 | |
| 1179 | .. deprecated:: 2.0 |
| 1180 | |
| 1181 | If `s` is not ``None``, `axes` must not be ``None`` either. |
| 1182 | |
| 1183 | .. deprecated:: 2.0 |
| 1184 | |
| 1185 | `s` must contain only ``int`` s, not ``None`` values. ``None`` |
| 1186 | values currently mean that the default value for ``n`` is used |
| 1187 | in the corresponding 1-D transform, but this behaviour is |
| 1188 | deprecated. |
| 1189 | |
| 1190 | axes : sequence of ints, optional |
| 1191 | Axes over which to compute the FFT. If not given, the last two |
| 1192 | axes are used. A repeated index in `axes` means the transform over |
| 1193 | that axis is performed multiple times. A one-element sequence means |
| 1194 | that a one-dimensional FFT is performed. Default: ``(-2, -1)``. |
| 1195 | |
| 1196 | .. deprecated:: 2.0 |
| 1197 | |
| 1198 | If `s` is specified, the corresponding `axes` to be transformed |
| 1199 | must not be ``None``. |
| 1200 | |
| 1201 | norm : {"backward", "ortho", "forward"}, optional |
| 1202 | Normalization mode (see `numpy.fft`). Default is "backward". |
nothing calls this directly
no test coverage detected
searching dependent graphs…