pydata / sparse

Sparse multi-dimensional arrays for the PyData ecosystem

Home Page:https://sparse.pydata.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for 'at' ufunc method

purepani opened this issue · comments

Is your feature request related to a problem? Please describe.
np.add.at(a, mask, b) is a replacement for a[mask] += b, except repeated indices will cause the addition to be performed as many times as they appear as opposed to just once. This ufunc method would be useful to support as using a for loop for this would be very costly.

Describe the solution you'd like
Add support for the at ufunc; currently a NotImplemented error is thrown when attempting to use np.add.at on sparse arrays.

[off topic]

@jakevdp I think you misunderstood the repo this issue was raised in. ;)

Ha, oops! Thanks.