ah... doesn't handle multiple occurrences of an index. What about [bincount](http://docs.scipy.org/doc/numpy/reference/generated/numpy.bincount.html)?