Only if `indices` has no repetitions:
```python
In [2]: a = np.zeros(3)
In [3]: indices = [0, 0, 1]
In [4]: a[indices] += 1
In [5]: a
Out[5]: array([ 1.,  1.,  0.])
```
Maybe with `np.bincount(indices, minlength=max_val+1)`