[Numpy-discussion] histogram2d and histogramdd return counts as floats while histogram returns ints

Nils Becker n.becker at amolf.nl
Fri May 11 12:46:12 EDT 2012


hi,

is this intended?

np.histogramdd([[1,2],[3,4]],bins=2)

(array([[ 1.,  0.],
       [ 0.,  1.]]),
 [array([ 1. ,  1.5,  2. ]), array([ 3. ,  3.5,  4. ])])

np.histogram2d([1,2],[3,4],bins=2)

(array([[ 1.,  0.],
       [ 0.,  1.]]),
 array([ 1. ,  1.5,  2. ]),
 array([ 3. ,  3.5,  4. ]))

np.histogram([1,2],bins=2)

(array([1, 1]), array([ 1. ,  1.5,  2. ]))


n.



More information about the NumPy-Discussion mailing list