Dec-22-2016, 04:51 PM
Hi!
I have two lists of data that I have done a linear fit on, and I would like to extrapolate this linearly but I don't really know how. I have attempted to do that but it's not working.
I have two lists of data that I have done a linear fit on, and I would like to extrapolate this linearly but I don't really know how. I have attempted to do that but it's not working.
from scipy.interpolate import interp1d import matplotlib.pyplot as plt import numpy as np x=[1,2,3,4,5,6] y=[2,4,6,8,10,12] p2=np.polyfit(x,y,1) f=interp1d(x,y,fill_value="extrapolate")Any help is appriciated!