x = [0, 1, 2, 3]
y = [0, 1, 4, 0]
tck = scipy.interpolate.splrep(x, y)
tck
pp = scipy.interpolate.interpolate.spltopp(tck[0][1:-1], tck[1], tck[2])
pp.coeffs.T
coefficients of spline interpolation in scipy