ihfftn

paddle.fft. ihfftn ( x, s=None, axes=None, norm='backward', name=None ) [source]

The n dimensional inverse FFT of a signal that has Hermitian symmetry.

This function computes the n dimensional inverse FFT over any number of axes in an M-dimensional of a signal that has Hermitian symmetry by means of an efficient algorithm called the Fast Fourier Transform (FFT).

Parameters
  • x (Tensor) – Input tensor.

  • s (Sequence[int], optional) – Shape (length along each transformed axis) to use from the input. (s[0] refers to axis 0, s[1] to axis 1, etc.). Along any 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.

  • axes (Sequence[int], optional) – Axis over which to compute the inverse FFT. If not given, the last axis is used.

  • norm (str, optional) – Normalization mode, indicates which direction of the forward/backward pair of transforms is scaled and with what normalization factor. Include {“backward”, “ortho”, “forward”}, default value 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

complex tensor.

Return type

out(Tensor)

Examples:

>>> import paddle

>>> spectrum = paddle.to_tensor([10.0, -5.0, 0.0, -1.0, 0.0, -5.0])
>>> print(paddle.fft.ifft(spectrum))
Tensor(shape=[6], dtype=complex64, place=Place(cpu), stop_gradient=True,
[(-0.1666666716337204+0j), (1-0j),
 (2.3333334922790527-0j), (3.5+0j),
 (2.3333334922790527+0j), (1+0j)])

>>> print(paddle.fft.ihfft(spectrum))
Tensor(shape=[4], dtype=complex64, place=Place(cpu), stop_gradient=True,
[(-0.1666666716337204+0j), (1-0j),
 (2.3333334922790527-0j), (3.5+0j)])