[NumPy-Tickets] [NumPy] #2098: Documentation of numpy.histogram2d() doesn't state x and y need the same size

NumPy Trac numpy-tickets@scipy....
Thu Apr 5 07:55:48 CDT 2012


#2098: Documentation of numpy.histogram2d() doesn't state x and y need the same
size
---------------------------+------------------------------------------------
 Reporter:  Sven Marnach   |       Owner:  pv         
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  Unscheduled
Component:  Documentation  |     Version:  1.6.1      
 Keywords:                 |  
---------------------------+------------------------------------------------
 The documentation describes the parameters as
 {{{
 x : array_like, shape(N,)
 y : array_like, shape(M,)
 }}}
 This gives the impression that `x` and `y` may have different shapes and
 left me confused as to what this function actually does.  If I pass two
 arrays of different sizes, I get the even more confusing error message
 {{{
 ValueError: setting an array element with a sequence.
 }}}
 The documentation should probably state that the values from `x` and `y`
 are paired, so in contrast to an 1D histogram, the order of the entries in
 `x` and `y` matter, at least relative to each other.

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


More information about the NumPy-Tickets mailing list