-
Notifications
You must be signed in to change notification settings - Fork 50
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
Assignment by integer array #864
Comments
Just a quick note that You're completely right that it's very messy across libraries - it's just very hard, since we can't mandate that libraries stop doing something and break backwards compatible (or technically we can, but it'll probably just be ignored rather than implemented). |
I couldn't find |
cross-ref #900 which aims to actually standardize it. |
Looks like gh-900 covered this request, and we can close it as completed, I'd think. |
Would be great to update the issue title/test then, if we repurpose it for |
[EDIT] this issue is about the lack of
xp.put
or equivalent__setitem_
semantics for integar array indices. Read comments below.[original post]
The current situation when an index is an array of ints or bools is very messy:
__array__
interfaceI think the array API standard should define a reasonable common surface.
xref data-apis/array-api-compat#205 (comment)
NOTE: the much more complicated case of multiple fancy indices, e.g.
a[[0, 1], [1, 2]]
is out of scope for this issue.The text was updated successfully, but these errors were encountered: