We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I found this repo very useful and tried it to see if I can completely replace some interpolation that I used for my package.
While testing, I found a slight mismatch with scipy:
from fast_interp import interp1d, interp2d from scipy import interpolate as si import numpy as np npt = 15 xvals, dx = np.linspace(0, 2*np.pi, npt, retstep=True) yvals = np.exp(xvals)*np.exp(np.sin(xvals))*np.cos(xvals/4) interpolater = interp1d(xvals.min(), xvals.max(), dx, yvals, k=3, p=False) scipy_interp = si.interp1d(xvals, yvals, kind="cubic") fig, axs = plt.subplots(2, 1, figsize=(8, 5), sharex=False, sharey=False, gridspec_kw={"height_ratios": [3, 1] }) xx = np.linspace(0, 2*np.pi, 1000) axs[0].plot(xvals, yvals, "o") axs[0].plot(xx, interpolater(xx), lw=0.5, label="fast_interp") axs[0].plot(xx, scipy_interp(xx), lw=0.5, label="scipy interp1d") axs[1].plot(xx, scipy_interp(xx) - interpolater(xx)) axs[0].legend() axs[1].set(title = "difference (scipy's interp1d - fast_interp)") plt.tight_layout() plt.show();
Maybe I am missing something or found a bug??
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I found this repo very useful and tried it to see if I can completely replace some interpolation that I used for my package.
While testing, I found a slight mismatch with scipy:
Maybe I am missing something or found a bug??
The text was updated successfully, but these errors were encountered: