-[ Example ]-



t = torch.rand(10, 10)
rfft2 = torch.fft.rfft2(t)
rfft2.size()
   torch.Size([10, 6])



Compared against the full output from "fft2()", we have all
   elements up to the Nyquist frequency.



fft2 = torch.fft.fft2(t)
torch.testing.assert_close(fft2[..., :6], rfft2, check_stride=False)



The discrete Fourier transform is separable, so "rfft2()" here is
   equivalent to a combination of "fft()" and "rfft()":



two_ffts = torch.fft.fft(torch.fft.rfft(t, dim=1), dim=0)
torch.testing.assert_close(rfft2, two_ffts, check_stride=False)


