Pytorch ffts center the dc component at the first position along each dimension, (0,0, ..., 0). However, it is easier to generate and visualize point spread functions as centered functions. fftshift and ifftshift enable easy transfer from zero and centered spaces. This package fills the void with an implementation of centered fft and iffts for Pytorch.
pip install pyfftc