Python, Programming, Computer Science, Data Science, Electrical Engineering.
± std. dev. of 7 runs, 10000 loops each) Next, we will use scipy instead of numpy. from scipy.fftpack import fft, ifft X = fft(x) plt.figure(figsize = (12, 6)) plt.subplot(121) plt.stem(freq, np.abs(X), 'b', \ markerfmt=" ", basefmt="-b") plt.xlabel('Freq (Hz)') plt.ylabel('FFT Amplitude