-
Notifications
You must be signed in to change notification settings - Fork 45
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
ENH: generate numpy scalars or 0D arrays #310
Conversation
Looks good. Can you check the tests with numpy itself, or at least array_api_compat.numpy, and then merge this? It's possible this could uncover some test failures, and we'd want to at least be aware of them if not fix them before merging here. This is an example of where having numpy tests run on CI could be useful (#298). array-api-strict does not use scalars (it internally converts any numpy scalar into a 0-D array), so the CI tests for it won't really say much here. |
Otherwise, on numpy we can generate a numpy scalar and copy=False, which fails with (Pdb) p np.asarray(np.False_, copy=False) *** ValueError: Unable to avoid copy while creating an array as requested.
It's interesting, actually. With numpy,
with
So, two things to discuss:
|
Merging after an offline discussion with Aaron. |
closes #289