[Scipy-tickets] [SciPy] #1657: fmin_slsqp ieqcons parameter broken

SciPy Trac scipy-tickets@scipy....
Thu May 10 09:42:43 CDT 2012


#1657: fmin_slsqp ieqcons parameter broken
----------------------------+-----------------------------------------------
 Reporter:  pv              |       Owner:  somebody   
     Type:  defect          |      Status:  new        
 Priority:  normal          |   Milestone:  Unscheduled
Component:  scipy.optimize  |     Version:  devel      
 Keywords:                  |  
----------------------------+-----------------------------------------------
 It seems the `ieqcons` parameter in fmin_slsqp is broken:
 {{{
 >>> fmin_slsqp(lambda z: z**2, [3.], ieqcons=[lambda z: z[0] - 1])
 Traceback (most recent call last):
     ...
 TypeError: object of type 'numpy.float64' as no len()
 }}}
 This still worked in 0.10.0

 Similarly, `f_ieqcons` does not automatically cast to arrays:
 {{{
 >>> fmin_slsqp(lambda z: z**2, [3.], f_ieqcons=lambda z: [z[0] - 1])
 Traceback (most recent call last):
     ...
 TypeError: unsupported operand type(s) for -: 'list' and 'list'
 }}}
 This fails similarly in 0.10.0

-- 
Ticket URL: <http://projects.scipy.org/scipy/ticket/1657>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list