Function torch::fft::hfft¶
Defined in File fft.h
Function Documentation¶
-
inline Tensor torch::fft::hfft(const Tensor &self, std::optional<SymInt> n = std::nullopt, int64_t dim = -1, std::optional<std::string_view> norm = std::nullopt)¶
Computes the 1 dimensional FFT of a onesided Hermitian signal.
The input represents a Hermitian symmetric time domain signal. The returned Fourier domain representation of such a signal is a real-valued. See https://pytorch.org/docs/main/fft.html#torch.fft.hfft
Example:
auto t = torch::randn(128 / 2 + 1, torch::kComplexDouble); auto T = torch::fft::hfft(t, /*n=*‍/128); assert(T.is_floating_point() && T.numel() == 128);