[Numpy-discussion] Re: A better syntax for using ufunc.at?

2024-07-25 Thread Oras P.
I can see that. I wanted to be more caught up with the discussions around this than anything else. Although I also have a lot of free time right now temporarily, and could make an attempt at implementing it. Is there any other channel I can get more feedback on this?

[Numpy-discussion] Re: A better syntax for using ufunc.at?

2024-07-25 Thread Oras P.
This is interesting, thank you for pointing it out! Good to know this is not a Numpy-only problem, I guess lol. Though the proposed syntax looks similar to my idea, I believe they are talking about a different problem there relating to translating python code to an accelerated language. I simply

[Numpy-discussion] A better syntax for using ufunc.at?

2024-07-24 Thread Oras P.
I am aware that to do unbuffered addition operation, I can use `np.add.at` like this: ``` np.add.at(arr, idxs, vals) ``` I think this syntax looks a bit unnatural, and it is not obvious what it does at first glance. An idea I have is to use a custom accessor, like ``` arr.at[idxs] += vals # or a