Fourier Transform, Data Science, Applied Mathematics, Mathematics, Computer Science.
whole continuum: k, g = fourier_transform_1d(f, x, sort_results=True) # make it easier to plot kk = np.linspace(-30,30, 100) plt.plot(k, np.real(g), label='Numerical'); plt.plot(k, np.sin(k/2)/(k/2), linestyle='-.', label='Analytic (samples)') plt.plot(kk, np.sin(kk/2)/(kk/2), linestyle='--',