numpy.ufunc.at
method
- ufunc.at(a, indices, b=None, /)
Performs unbuffered in place operation on operand ‘a’ for elements specified by ‘indices’. For addition ufunc, this method is equivalent to
a[indices] += b, except that results are accumulated for elements that are indexed more than once. For example,a[[0,0]] += 1will only increment the first element once because of buffering, whereasadd.at(a,will increment the first element twice.