[Numpy-discussion] Initial implementation of histogram_discrete()

Priit Laes plaes@plaes....
Thu Nov 12 17:00:57 CST 2009


Hey,

I cooked up an initial implementation for one-dimensional
histogram_discrete().

Example:

>> import numpy
>> numpy.histogram_discrete([-1, 9, 9, 0, 3, 5, 3])
array([1, 1, 0, 0, 2, 0, 1, 0, 0, 0, 2])
>> numpy.histogram_discrete([-99999, 99999])
array([1, 0, 0, ..., 0, 0, 1])

Suggestions, criticism? :)

Priit :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: numpy-histogram_discrete.patch
Type: text/x-patch
Size: 3780 bytes
Desc: 
Url : http://mail.scipy.org/pipermail/numpy-discussion/attachments/20091113/c583369e/attachment.bin 


More information about the NumPy-Discussion mailing list