fft#
- sionna.phy.signal.fft(tensor: torch.Tensor, axis: int = -1, precision: Literal['single', 'double'] | None = None) torch.Tensor[source]#
Computes the normalized DFT along a specified axis.
This operation computes the normalized one-dimensional discrete Fourier transform (DFT) along the
axisdimension of atensor. For a vector \(\mathbf{x}\in\mathbb{C}^N\), the DFT \(\mathbf{X}\in\mathbb{C}^N\) is computed as\[X_m = \frac{1}{\sqrt{N}}\sum_{n=0}^{N-1} x_n \exp \left\{ -j2\pi\frac{mn}{N}\right\},\quad m=0,\dots,N-1.\]- Parameters:
tensor (torch.Tensor) – Tensor of arbitrary shape (torch.complex)
axis (int) – Dimension along which the DFT is taken
precision (Literal['single', 'double'] | None) – Precision used for internal calculations and outputs. If set to None,
precisionis used.
- Outputs:
x_f – torch.complex. Tensor of the same shape as
tensor.
Examples
import torch from sionna.phy.signal import fft x = torch.randn(32, 64, dtype=torch.complex64) X = fft(x) print(X.shape) # torch.Size([32, 64])