Skip to content

Instantly share code, notes, and snippets.

@jesuscast
Created September 9, 2014 18:45
Show Gist options
  • Save jesuscast/f8e32a80fe2f84aa852c to your computer and use it in GitHub Desktop.
Save jesuscast/f8e32a80fe2f84aa852c to your computer and use it in GitHub Desktop.
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])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment