import numpy as np x = np.array([0.0,1.0,2.0]) y = np.array([0.0,0.8,0.9]) z = np.polyfit(x,y,3) p = np.poly1d(z) y2 = [ p(N) for N in x ] print str(y2[0])
Standard input is empty
6.40987562128e-17
/usr/local/lib/python2.7/dist-packages/numpy/lib/polynomial.py:585: RankWarning: Polyfit may be poorly conditioned warnings.warn(msg, RankWarning)