scipy.optimize.lbfgsb help please!!!

mclaugb mclaugb at nospm.yahoo.com
Sun Jan 21 01:17:50 CET 2007


Just to clarify--this is a multivariate algorithm.  I changed the function 
Permmin to simply take the absolute value of (xmin, ymin) so that it returns 
one value.  Unfortunately, the error remains--it still returns this error:

" x, f, d = lbfgsb.fmin_l_bfgs_b(Permmin, x0, Jacobi, params, 
bounds=[(.001,100),(-50,-.001)] , maxfun=500)
  File "C:\Python24\lib\site-packages\scipy\optimize\lbfgsb.py", line 197, 
in fmin_l_bfgs_b
    isave, dsave)
ValueError: failed to initialize intent(inout) array -- expected elsize=8 
but got 4 -- input 'l' not compatible to 'd'"



"Robert Kern" <robert.kern at gmail.com> wrote in message 
news:mailman.2953.1169333789.32031.python-list at python.org...
> mclaugb wrote:
>> Does anyone out there have a piece of code that demonstrates the use of 
>> the
>> lbfgsb multivariate, bounded solver in the scipy.optimize toolkit?  An
>> example would get me started because my code below does not seem to work.
>
> You will probably get better/faster/more answers on the scipy-user mailing 
> list.
>
>  http://www.scipy.org/Mailing_Lists
>
>> Permmin is a function that simply returns a vector array [xmin, ymin]
>
> This is your problem. The function to minimize must return a scalar, not a
> vector. This is not a multi-objective optimizer.
>
> -- 
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless 
> enigma
> that is made terrible by our own mad attempt to interpret it as though it 
> had
> an underlying truth."
>  -- Umberto Eco
> 





More information about the Python-list mailing list