torch.fft.fftshift
torch.fft.fftshift(input, dim=None) -> Tensor
Reorders n-dimensional FFT data, as provided by "fftn()", to have
   negative frequency terms first.
This performs a periodic shift of n-dimensional data such that the
   origin "(0, ..., 0)" is moved to the center of the tensor.
   Specifically, to "input.shape[dim] // 2" in each selected
   dimension.
Note:
 By convention, the FFT returns positive frequency terms first,
 followed by the negative frequencies in reverse order, so that
 "f[-i]" for all 0 < i \leq n/2 in Python gives the negative
 frequency terms. "fftshift()" rearranges all frequencies into
 ascending order from negative to positive with the zero-frequency
 term in the center.

Note:
 For even lengths, the Nyquist frequency at "f[n/2]" can be
 thought of as either negative or positive. "fftshift()" always
 puts the Nyquist term at the 0-index. This is the same convention
 used by "fftfreq()".
