[SciPy-User] Storing return values of optimize.fmin()
Jeroen Meidam
jmeidam@nikhef...
Mon Apr 22 05:07:44 CDT 2013
Hi,
I am using optimize.fmin to minimize a function over 2 parameters.
In the documentation it says that the output is:
(xopt, {fopt, iter, funcalls, warnflag})
I have no problem putting xopt into a variable, because this is simply done
by writing:
xopt = fmin(function,x0)
After which I can use xopt for anything I need it for.
What I want however, is to store "fopt" into a variable, like I did with
xopt. In the standard case, fopt is only returned as text in the output
stream:
"
Optimization terminated successfully.
Current function value: -0.995801 <--- This is what I'm
interested in
Iterations: 35
Function evaluations: 71
"
How can I store it into a variable? Is it possible?
Thanks,
Jeroen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130422/8c43ebd4/attachment-0001.html
More information about the SciPy-User
mailing list