Index: numpy/fft/fftpack.py =================================================================== --- numpy/fft/fftpack.py (revision 4021) +++ numpy/fft/fftpack.py (working copy) @@ -51,14 +51,25 @@ index = [slice(None)]*len(s) index[axis] = slice(0,n) a = a[index] + + # Adjust the Nyquist frequency coefficient + index[axis] = -1 + a[index] *= 2 + else: index = [slice(None)]*len(s) index[axis] = slice(0,s[axis]) s[axis] = n z = zeros(s, a.dtype.char) z[index] = a + + # Adjust the Nyquist frequency coefficient + index[axis] = a.shape[axis] + z[index] /= 2. + a = z + if axis != -1: a = swapaxes(a, axis, -1) r = work_function(a, wsave) @@ -148,7 +159,7 @@ If you specify an n such that a must be zero-padded or truncated, the extra/removed values will be added/removed at high frequencies. One can thus resample a series to m points via Fourier interpolation by: a_resamp - = irfft(rfft(a), m). + = irfft(rfft(a), m)*(m/float(len(a))). This is the inverse of rfft: irfft(rfft(a), len(a)) == a