[SciPy-User] computing f and fprime in one evaluation in scipy.optimize

Skipper Seabold jsseabold@gmail....
Mon Dec 10 09:06:27 CST 2012

On Mon, Dec 10, 2012 at 1:23 AM, ali rahimi <alicsailmitedu@gmail.com> wrote:
> When minimizing a function f(x), df/dx can often also be computed with little additional effort. Yet the routines in scipy.optimize accept df/dx as a separate function fprime which must repeat much of the computation of f.
> do the scipy.optimize routines allow me to compute f and fprime simultaneous in one call? this is important to me because each evaluation in my case takes ~10 minutes and a few iterations of the optimizer is all i need.

AFAIK, fmin_l_bfgs_b is the only optimize function written so that f
can also return fprime, but I agree that this could be a nice option
to the other ones.


More information about the SciPy-User mailing list