[Numpy-tickets] [NumPy] #509: histogramdd fails on indentical input arrays

NumPy numpy-tickets@scipy....
Wed May 2 09:17:51 CDT 2007


#509: histogramdd fails on indentical input arrays
--------------------+-------------------------------------------------------
 Reporter:  dhuard  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:          
Component:  Other   |     Version:  none    
 Severity:  normal  |    Keywords:          
--------------------+-------------------------------------------------------
 Emanuele Olivetti reported the following bug on the numpy discussion list.
 {{{
 import numpy
 x = numpy.array([0,0])
 y = numpy.array([0,1])
 numpy.histogram2d(x,y,bins=[2,2])
 -----------------------------------------------------------------
 Warning: divide by zero encountered in log10
 ---------------------------------------------------------------------------
 exceptions.OverflowError                             Traceback (most
 recent call last)
 }}}
 The patch fixes this and adds the relevant test. The fix makes the
 behavior identical to histogram, namely that if min() == max(), the range
 is chosen as [min()-.5, max()+.5].

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


More information about the Numpy-tickets mailing list