[Numpy-discussion] New functions.

David Cournapeau cournape@gmail....
Wed Jun 1 20:35:45 CDT 2011

On Thu, Jun 2, 2011 at 1:49 AM, Mark Miller <markperrymiller@gmail.com> wrote:
> Not quite. Bincount is fine if you have a set of approximately
> sequential numbers. But if you don't....

Even worse, it fails miserably if you sequential numbers but with a high shift.

np.bincount([100000001, 100000002]) # will take a lof of memory

Doing bincount with dict is faster in those cases.



More information about the NumPy-Discussion mailing list