Cubic spline interpolation get coefficients
问题 Say I have two arrays in python and I wish to get (and actually use) the cubic spline interpolation between those points. (IE: I wish to integrate the function). I would strongly prefer a way using numpy scipy. I know about scipy.interpolate.interp1d. However that only allows me to evalute the points, for say the very simply function of: Now I could do something simply like: import numpy as np import scipy.interpolate import matplotlib.pyplot as plt y = np.array([0,2,3,4,8,10,12,12,12,10,9,8