meddlr.ops.fftnc#
- meddlr.ops.fftnc(input: Tensor, dim=None, norm='ortho', is_real: Optional[bool] = None) Tensor[source]#
Apply nD centered fast fourier transform.
This function is a backwards-compatible wrapper for centered
torch.fft.fftn(). It supports backwards compatibility with ``torch.fft``as implemented in torch<1.7.- Parameters
input (torch.Tensor) – A tensor (typically complex).
dim (Tuple[int]) – Dimensions to be transformed.
norm (str | bool, optional) – The normalization method. Defaults to
'ortho'. For torch<1.7, only'ortho'is supported.is_real (bool, optional) – If
True,inputis a real-valued tensor. IfNoneorFalseandinput.shape[-1] == 2,inputis a real-view of a complex tensor.
- Returns
torch.Tensor
Note
Real-valued tensors are not supported with
torch<1.7.