def func(x,a,b): return a*x*x + b for b in xrange(10): popt,pcov = curve_fit(lambda x, a: func(x, a, b), x1, x2)