[SciPy-User] using scipy.optimize.fmin_slsqp and setting bounds=(None, None)

Robert Kern robert.kern at gmail.com
Tue Oct 20 01:17:40 EDT 2009


On Mon, Oct 19, 2009 at 16:46, Peter Halverson
<halverson.peter at yahoo.com> wrote:
> I'm not sure if this is user error or an actual bug. When I attempt to set
> my bounds in fmin_slsqp the option bounds =[(-10,10),(0,None)] is not
> recognized Scipy crashes with
>
> IndexError                                Traceback (most recent call last)
>
> C:\Documents and Settings\All Users\Documents\Python\<ipython console> in
> <module>()
>
> C:\Python25\lib\site-packages\scipy\optimize\slsqp.pyc in fmin_slsqp(func,
> x0, eqcons, f_eqcons, ieqcons, f_ieqcons, bounds, fprime, fprime_eqcons,
> fprime_ieqcons, args, iter, acc, iprint, full_output, epsilon)
>     244             if bounds[i][0] > bounds[i][1]:
>     245                 raise ValueError, \
> --> 246                 'SLSQP Error: lb > ub in bounds[' + str(i) +']  ' +
> str(bounds[4])
>     247
>     248     xl = array( [ b[0] for b in bounds ] )
>
> IndexError: list index out of range

Bug. A couple of bugs, actually.

-- 
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 SciPy-User mailing list