Created
February 12, 2016 04:26
-
-
Save normalhuman/2b3778eb4660a7cfa258 to your computer and use it in GitHub Desktop.
example for http://stackoverflow.com/q/35350542
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scipy.optimize as optimization | |
def u(x, a): | |
return numerical_integral(lambda t: x*a+t, 0, 1)[0] | |
print optimization.curve_fit(u, [1,2,3], [1,3,2], [1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment