[SciPy-user] optimize.fmin_l_bfgs_b problem

Nils Wagner nwagner@iam.uni-stuttgart...
Mon Jun 9 09:12:04 CDT 2008


On Mon, 9 Jun 2008 15:50:53 +0200
  Marek Wojciechowski <mwojc@p.lodz.pl> wrote:
> Hi!
> The following command:
>    optimize.fmin_l_bfgs_b(lambda x: x[0]**2, [-1.], 
>iprint=1)
> causes an error and breaks the python session with the 
>following output:
> 
> RUNNING THE L-BFGS-B CODE
> 
>           * * *
> 
> At line 2647 of file scipy/optimize/lbfgsb/routines.f
> Internal Error: printf is broken
> Machine precision =
> 
> This occurs on scipy-0.6.0 and python 2.4 under Gentoo 
>Linux. Is this the 
> known bug?
> 
> Greetings,
> -- 
> Marek Wojciechowski

I get

>>> optimize.fmin_l_bfgs_b(lambda x: x[0]**2, [-1.], iprint=1)
RUNNING THE L-BFGS-B CODE

            * * *

Machine precision = 2.220E-16
  N =  1    M =  10
  This problem is unconstrained.

At X0         0 variables are exactly at the bounds
Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File 
"/data/home/nwagner/local/lib/python2.5/site-packages/scipy/optimize/lbfgsb.py", 
line 205, in fmin_l_bfgs_b
     f, g = func_and_grad(x)
   File 
"/data/home/nwagner/local/lib/python2.5/site-packages/scipy/optimize/lbfgsb.py", 
line 156, in func_and_grad
     f, g = func(x, *args)
TypeError: 'numpy.float64' object is not iterable

>>> scipy.__version__
'0.7.0.dev4420'


  


More information about the SciPy-user mailing list