[Numpy-tickets] [NumPy] #440: Inconsistent behaviour for empty arrays

NumPy numpy-tickets at scipy.net
Tue Jan 30 05:36:30 CST 2007


#440: Inconsistent behaviour for empty arrays
--------------------+-------------------------------------------------------
 Reporter:  stefan  |       Owner:  stefan       
     Type:  defect  |      Status:  new          
 Priority:  normal  |   Milestone:  1.0.2 Release
Component:  Other   |     Version:               
 Severity:  normal  |    Keywords:               
--------------------+-------------------------------------------------------
 Functions returning floating point values based on array input, like mean,
 average and median should behave in a consistent fashion.

 Current situation:

 mean([]) -> nan
 average([]) -> ZeroDivisionError
 median([]) -> IndexError

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/440>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list