[NumPy-Tickets] [NumPy] #1375: min() and max() accept and return dictionaries

NumPy Trac numpy-tickets@scipy....
Tue Jan 26 08:46:19 CST 2010

#1375: min() and max() accept and return dictionaries
 Reporter:  gabriel     |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:          
Component:  numpy.core  |     Version:  1.3.0   
 Keywords:  min max     |  
 This is probably not desired, or is it?

 In [1]: numpy.min({'a':45})[[BR]]

 Out[1]: {'a': 45}

 The same goes for max()

 However I see that Python's built-in min() also happily accepts
 dictionaries; it escapes me why.

 Numpy's behavior is not restricted to dictionaries, but min() and max()
 will also happily accept esoteric user-defined class instances and return

Ticket URL: <http://projects.scipy.org/numpy/ticket/1375>
NumPy <http://projects.scipy.org/numpy>
My example project

More information about the NumPy-Tickets mailing list