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