[Numpy-discussion] indexed arrays ignoring duplicates

Pauli Virtanen pav@iki...
Wed Sep 29 12:00:56 CDT 2010

Wed, 29 Sep 2010 11:15:08 -0500, Robert Kern wrote:
[clip: inplace addition with duplicates]
> Use numpy.bincount() instead.

It might be worthwhile to add a separate helper function for this 
purpose. Bincount makes a copy that could be avoided, and it is difficult 
to find if you don't know about this trick.

Pauli Virtanen

More information about the NumPy-Discussion mailing list