[Scipy-tickets] [SciPy] #1836: obsolete max min in optimize, breaks repr

SciPy Trac scipy-tickets@scipy....
Sat Feb 2 07:18:15 CST 2013


#1836: obsolete max min in optimize, breaks repr
----------------------------+-----------------------------------------------
 Reporter:  josefpktd       |       Owner:  dlaxalde   
     Type:  defect          |      Status:  new        
 Priority:  normal          |   Milestone:  Unscheduled
Component:  scipy.optimize  |     Version:  0.11.0     
 Keywords:                  |  
----------------------------+-----------------------------------------------
 max and min are redefined here
 https://github.com/scipy/scipy/blob/master/scipy/optimize/optimize.py#L130

 besides being bad coding to shadow python built-ins, it breaks the repr in
 optimize on python 3.3

 https://github.com/scipy/scipy/blob/master/scipy/optimize/optimize.py#L111

 I just ran into this running the benchmark of PR 355 on python 3.3

 {{{
   File "C:\Programs\Python33\lib\site-
 packages\scipy\optimize\optimize.py", line 111, in __repr__
     m = max(map(len, list(self.keys()))) + 1
 TypeError: unsupported operand type(s) for +: 'map' and 'int'
 }}}

 (using a recent Goehlke binary with master for scipy)

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


More information about the Scipy-tickets mailing list