scipy/scipy — pull request #3845 by trendelkampschroer (2014-07-31 08:57:26+00:00)
Title: Bug fix for #3842: Bug in scipy.optimize.line_search

There is a bug in scipy.optimize.line_search, which as I believe is the function line_search_wolfe2 in scipy.optimize.linesearch.

I think line 258 should be
gfk=fprime(xk, *args) instead
of gfk=fprime(xk)

otherwise the optional arguments are not passed along to myfprime, if I do not specify the current value of the Jacobian gfk when calling the function.

The docstrings of scipy.optimize.line_search are also missing some of the stuff returned by scipy.optimize.linesearch.line_search_wolfe2.

i) I have fixed the bug. Optional arguments are now passed along to myfprime.

ii) I have added missing docstring for the return values of line_search_wolfe2. I have chosen the names on the basis of my understanding of the algorithm but I would be glad if someone more familiar with the code could review them.