Zero-padding, energy conservation
What scipy.fftpack.fft effectively does is (docs):


y(j) = (x * exp(-2*pi*sqrt(-1)*j*np.arange(n)/n)).sum().`



This has no built-in normalization. If you do fft and then ifft, you need to normalize by multiplication by $1/n$ to get back your original data.

Or, you can do:


step 1: fft, then normalize by $1/\sqrt{n},$ then
step 2: ifft, then normalize by $1/\sqrt{n}.$


This gives the same final result because $1/\sqrt{n}\times1/\sqrt{n} = 1/n,$ and agrees with your intuition: The sum of squares of absolute values before and after each step remains equal. The steps compute the unitary discrete Fourier (DFT) and inverse discrete Fourier transforms (IDFT). With larger $n$ the same amount of "energy" as before will be distributed to more frequency bins so each value must be on average smaller in magnitude.