[SciPy-user] fmin_l_bfgs_b problem

David M. Cooke cookedm at physics.mcmaster.ca
Mon Aug 9 19:56:05 CDT 2004


On Mon, Aug 09, 2004 at 02:39:59AM -0700, bulatov at cs.orst.edu wrote:
> Was anyone able to use fmin_l_bfgs_b optimizer successfully?

Well, I wrote the wrapper, so I hope so :-)

> When I run it with the same parameters as the fmin_bfgs example in the tutorial,
> I get the error:
> 
> xopt = fmin_l_bfgs_b(log_likelihood, x0, fprime=log_likelihood_der)
> File "C:\Python23\Lib\site-packages\scipy\optimize\lbfgsb.py", line 174, in fm
> in_l_bfgs_bisave, dsave)
> error: failed in converting 7th argument `g' of _lbfgsb.setulb to C/Fortran
> array

Are you sure log_likelihood_der returns an array (of the same length as
x0)?

-- 
|>|\/|<
/--------------------------------------------------------------------------\
|David M. Cooke                      http://arbutus.physics.mcmaster.ca/dmc/
|cookedm at physics.mcmaster.ca



More information about the SciPy-user mailing list