I have interpolation function:
from scipy import interpolate
def f(x):
x_points = [38508,38510,38512]
y_points = [0.249267578125,0.181396484375,0.1912841796875]
tck = interpolate.splrep(x_points, y_points,k=2,xb=38508,xe=38512)
return interpolate.splev(x, tck)
when i evaluate f(38503)
output is 0.75
which is nothing like y_points.
Any suggestion on how to decrease this error using this or other interpolation methods?