Just posted this on the GitHub issue tracker (see below). The tldr is that I didn’t read the docs carefully enough! The following code snippet will run.
from numpy import allclose
import torch

x = torch.randn(100)
rfft = torch.rfft(x, signal_ndim=1)
irfft = torch.irfft(rfft, signal_ndim=1,
                    onesided=True, signal_sizes=x.shape).numpy()

assert allclose(x, irfft, rtol=1e-4)


  
      github.com/pytorch/pytorch
  
  
    



Issue: `torch.irfft` and `np.fft.irfft` disagree 18


	
	opened by eigenfoo
	on 2019-04-10
	
	
	closed by eigenfoo
	on 2019-04-11
	


🐛 Bug
I originally posted this on the PyTorch forums, but I suspect it is a bug and belongs here.
Briefly, torch.irfft and...


 	module: numpy
 	module: operators
 	triaged