Skip to content

Instantly share code, notes, and snippets.

@chomy
Created November 25, 2013 12:08
Show Gist options
  • Select an option

  • Save chomy/7640357 to your computer and use it in GitHub Desktop.

Select an option

Save chomy/7640357 to your computer and use it in GitHub Desktop.
import numpy as np
import scipy.optimize
func = lambda x,a,b,c: a + b*x + c*x*x
x,y = np.loadtxt('fit.dat', unpack=True)
print scipy.optimize.curve_fit(func, x, y)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment