KFrank:

Pytorch’s fft functions, including ifft(), pad by simply appending zeros
to the end of the input vector – they don’t insert zeros into the middle.


Thanks for the help. I actually do need the complex version and just used the torch.arange as an example. I understand your point that fft and ifft pad the zeros to the end but I am now wondering when this would ever be useful for an inverse Fourier transform? Are there good reasons / is the behaviour that I expected worth making a feature request?