[NumPy-Tickets] [NumPy] #1788: histogramdd doesn't like bins with infinite edges

NumPy Trac numpy-tickets@scipy....
Thu Mar 31 04:32:20 CDT 2011


#1788: histogramdd doesn't like bins with infinite edges
-----------------------+----------------------------------------------------
 Reporter:  eschlafly  |       Owner:  somebody   
     Type:  defect     |      Status:  new        
 Priority:  normal     |   Milestone:  Unscheduled
Component:  numpy.lib  |     Version:  1.5.1      
 Keywords:             |  
-----------------------+----------------------------------------------------

Comment(by rgommers):

 This shouldn't be too hard to fix. In addition, bins can be specified in
 two ways, mixing them gives confusing errors:
 {{{
 >>> x = np.arange(8).reshape(2, 4)
 >>> h, e = np.histogramdd(x, bins=[1, 2, 4, 5])
 >>> h, e = np.histogramdd(x, bins=[-1, 2, 4, 5])
 ------------------------------------------------------------
 Traceback (most recent call last):
   File "<ipython console>", line 1, in <module>
   File "/Users/zouzoujing/Code/numpy/numpy/lib/function_base.py", line
 341, in histogramdd
     decimal = int(-log10(dedges[i].min())) +6
 ValueError: zero-size array to minimum.reduce without identity
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1788#comment:1>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list