[Numpy-discussion] Initial implementation of histogram_discrete()

Priit Laes plaes at plaes.org
Thu Nov 12 18:00:57 EST 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.python.org/pipermail/numpy-discussion/attachments/20091113/c583369e/attachment.bin>


More information about the NumPy-Discussion mailing list