[SciPy-dev] Small bug fix in l-bfgs-b solver

Travis Oliphant oliphant at ee.byu.edu
Wed Nov 24 15:44:57 EST 2004


Ed Schofield wrote:

> The file lbfgsb.py in Lib/optimize/ has a bug that prevents it working 
> with an argument list.
>
> Here's a patch:
>
> 179c179
> <             f[0], g = func_and_grad(x, *args)
> ---
> >             f[0], g = func_and_grad(x)
>
Could you give an example of this not working.  func_and_grad is defined 
within the function and handles passing the argument list there.  So, it 
should not be needed here.

I just added from __future__ import nested_scopes which may fix the 
problem you were seeing.

-teo




More information about the SciPy-Dev mailing list