torch.fft.ifftshift
- torch.fft.ifftshift(input, dim=None) → Tensor
Inverse of
fftshift().- Parameters
Inverse of fftshift().
>>> f = torch.fft.fftfreq(5)
>>> f
tensor([ 0.0000, 0.2000, 0.4000, -0.4000, -0.2000])
A round-trip through fftshift() and
ifftshift() gives the same result:
>>> shifted = torch.fft.fftshift(f)
>>> torch.fft.ifftshift(shifted)
tensor([ 0.0000, 0.2000, 0.4000, -0.4000, -0.2000])