[SciPy-User] numpy.histogram is slow

Chris Weisiger cweisiger@msg.ucsf....
Tue Oct 16 15:35:20 CDT 2012


On Tue, Oct 16, 2012 at 1:12 PM, Zachary Pincus <zachary.pincus@yale.edu> wrote:
>
> Uh, no? Bincount doesn't omit bins below the maximum value in the input, even if the count is zero:
> In [205]: numpy.bincount([5,5,10])
> Out[205]: array([0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1])

Apologies, my test code was misleading me. You're right, and bincount
ought to be able to do what I want it to do. Sorry for wasting
everyone's time, and thanks for the correction.

-Chris


More information about the SciPy-User mailing list