Function torch::fft::rfft¶
Defined in File fft.h
Function Documentation¶
-
inline Tensor torch::fft::rfft(const Tensor &self, std::optional<SymInt> n = std::nullopt, int64_t dim = -1, std::optional<c10::string_view> norm = std::nullopt)¶
Computes the 1 dimensional FFT of real input with onesided Hermitian output.
See https://pytorch.org/docs/main/fft.html#torch.fft.rfft.
Example:
auto t = torch::randn(128); auto T = torch::fft::rfft(t); assert(T.is_complex() && T.numel() == 128 / 2 + 1);