-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: scalars don't have dlpack support #27137
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
Comments
Duplicate of #26850. Is there any particular you're problem with getting a scalar here? If it's a duck typing issue we should fix the issue in the scalars like in that issue. |
particular problem for me was missing dlpack functionality on scalars |
Maybe we could add a |
That's maintainers' decision. From my user perspective I was quite happy that array api removes different corner cases in favor of uniformity (e.g. returning arrays), but I have no insight about potential performance issues. |
Uh oh!
There was an error while loading. Please reload this page.
Describe the issue:
reduction (e.g. xp.sum) are expected to produce arrays, but in numpy they produce scalars, that don't follow array api specifications (e.g. I can't use dlpack on those).
In numpy v1, np.array_api correctly returned arrays in this case
Reproduce the code example:
Python and NumPy Versions:
The text was updated successfully, but these errors were encountered: