sparse icon indicating copy to clipboard operation
sparse copied to clipboard

Support for 'at' ufunc method

Open purepani opened this issue 2 years ago • 3 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.

purepani avatar Apr 25 '22 15:04 purepani

[off topic]

jakevdp avatar Apr 25 '22 16:04 jakevdp

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

hameerabbasi avatar Apr 25 '22 16:04 hameerabbasi

Ha, oops! Thanks.

jakevdp avatar Apr 25 '22 18:04 jakevdp