ihfft2¶
- paddle.fft. ihfft2 ( x: Tensor, s: list[int] | tuple[int, int] | None = None, axes: list[int] | tuple[int, int] = (- 2, - 1), norm: _NormalizeMode = 'backward', name: str | None = None ) Tensor [source]
-
Compute the two dimensional inverse FFT of a real spectrum.
This is really ihfftn with different defaults. For more details see ihfftn.
- Parameters
-
x (Tensor) – Input tensor.
s (sequence[int]|None, optional) – Shape (length of each transformed axis) of the output. It should be a sequence of 2 integers. This corresponds to
n
forihfft(x, n)
. Along each axis, if the given shape is smaller than that of the input, the input is cropped. If it is larger, the input is padded with zeros. if s is not given, the shape of the input along the axes specified by axes is used. Default is None.axes (sequence[int], optional) – Axes over which to compute the inverse FFT. It should be a sequence of 2 integers. If not specified, the last two axes are used by default.
norm (str, optional) – {“backward”, “ortho”, “forward”}. Default is “backward”.
name (str, optional) – The default value is None. Normally there is no need for user to set this property. For more information, please refer to Name .
- Returns
-
The result of the inverse hermitian 2-D FFT.
- Return type
-
out(Tensor)
Examples
>>> import paddle >>> arr = paddle.arange(5, dtype="float64") >>> x = paddle.meshgrid(arr, arr)[0] >>> print(x) Tensor(shape=[5, 5], dtype=float64, place=Place(cpu), stop_gradient=True, [[0., 0., 0., 0., 0.], [1., 1., 1., 1., 1.], [2., 2., 2., 2., 2.], [3., 3., 3., 3., 3.], [4., 4., 4., 4., 4.]]) >>> ihfft2_xp = paddle.fft.ihfft2(x) >>> print(ihfft2_xp.numpy()) [[2. +0.j 0. -0.j 0. -0.j] [-0.5-0.68819096j 0. +0.j 0. +0.j] [-0.5-0.16245985j 0. +0.j 0. +0.j] [-0.5+0.16245985j 0. +0.j 0. +0.j] [-0.5+0.68819096j 0. +0.j 0. +0.j]]