-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incrementing array location with rank 0 array #9573
Comments
Thanks for the report @aseyboldt, can confirm the bug. |
Fix should be similar to what was done in #4516 |
As a workaround I think you can write @numba.njit
def inc_array(x, val):
x[()] += val |
Do you mean
because otherwise this will increment all locations in x, not just the first. |
Sorry, I think I mean something like that, yes - I'd come across this issue before of having to use |
If it helps, this is only a problem when the lhs is a vector (and a number after indexing). It's fine when it's a matrix (and a vector after indexing) |
On current main I can not increment a location of an array with a rank 0 value:
If I call it with a scalar value instead, it work:
The text was updated successfully, but these errors were encountered: