What is the best way to do a quadratic spline in python? I used the interp1d
, but this method is not what I pretend to do.
The is the example of python code:
from scipy.interpolate import interp1d
x = [5,6,7,8,9,10,11]
y = [2,9,6,3,4,20,6]
xx = [1,2,3,4,5,6,7,8,9,10,11,12]
f = interp1d(x, y, kind='quadratic')
yy = f(xx)
Every time I run this code I get this error:
ValueError: A value in x_new is below the interpolation range.