hfft2

paddle.fft. hfft2 ( 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 2-D FFT of a Hermitian complex array.

Parameters
  • x (Tensor) – The input data. It’s a Tensor type.

  • 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 for hfft(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 FFT. It should be a sequence of 2 integers. If not specified, the last two axes are used by default.

  • norm (str) – Indicates which direction to scale the forward or backward transform pair and what normalization factor to use. The parameter value must be one of “forward” or “backward” or “ortho”. Default is “backward”.

  • name (str|None, 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

Real tensor. The real result of the 2-D Hermitian complex real FFT.

Examples

>>> import paddle

>>> x = paddle.to_tensor([[3.+3.j, 2.+2.j, 3.+3.j], [2.+2.j, 2.+2.j, 3.+3.j]])
>>> hfft2_x = paddle.fft.hfft2(x)
>>> print(hfft2_x)
Tensor(shape=[2, 4], dtype=float32, place=Place(cpu), stop_gradient=True,
[[19., 7., 3., -9.],
 [1., 1., 1., 1.]])