[Numpy-discussion] A minor clarification no why count_nonzero is faster for boolean arrays

Raghav R V ragvrv at gmail.com
Thu Dec 17 18:13:15 EST 2015


Thanks a lot everyone!

I am time and again amazed by how optimized numpy is! Hats off to you guys!

R

On Thu, Dec 17, 2015 at 11:02 PM, Jaime Fernández del Río <
jaime.frio at gmail.com> wrote:

> On Thu, Dec 17, 2015 at 7:37 PM, CJ Carey <perimosocordiae at gmail.com>
> wrote:
>
>> I believe this line is the reason:
>>
>> https://github.com/numpy/numpy/blob/c0e48cfbbdef9cca954b0c4edd0052e1ec8a30aa/numpy/core/src/multiarray/item_selection.c#L2110
>>
>
> The magic actually happens in  count_nonzero_bytes_384, a few lines
> before that (line 1986).
>
> Jaime
>
> --
> (\__/)
> ( O.o)
> ( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
> de dominación mundial.
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> https://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20151218/f4a8cbf1/attachment.html>


More information about the NumPy-Discussion mailing list