I am trying to use scipy.interpolate.lagrange
to interpolate the following data, which is of degree 8:
x_data = [1900., 1910., 1920., 1930., 1940., 1950., 1960., 1970., 1980.]
y_data = [76212168., 92228496., 106021537., 123202624., 132164569., 151325798., 179323175., 203302031., 226542199.]
with python code: poly = scipy.interpolate.lagrange(x_data, y_data)
But the output looks not correct because even none of the (x_data[i], y_data[i])
pairs lies on the 'poly' I got from the scipy.interpolate.lagrange
call.
Could anybody give any hints or suggestion? Thanks so much.