-
Notifications
You must be signed in to change notification settings - Fork 8
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
Preliminary 2023.12 support #35
Conversation
It is only enabled for when the api version is 2023.12. I have only tested that it works manually. There is no test suite support for clip() yet.
copysign is not tested yet by the test suite, but the standard does not appear to deviate from NumPy (except in the restriction to floating-point dtypes).
This is untested, but the NumPy hypot() should match the standard.
Also add a meta-test to ensure the elementwise tests stay up-to-date.
NumPy allows it to be bool (casting it to int).
As far as I can tell, except for the dtype restriction, the standard is the same as NumPy.
@honno the tests are failing here because I have this behavior:
It can be enabled by setting the version flag to 2023.12, but I'd like to be able to test all supported versions here. But the test suite uses |
We might need to remove this if we ever test things that NumPy raises warnings for.
Test suite should be fixed by data-apis/array-api-tests#257. But I also need to add test runs for 2023.12. Apparently the signature and special cases are already running against 2023.12, so we can go ahead and add that. |
The new arguments are not actually supported yet, and probably won't be until upstream NumPy does.
This is how the test suite and presumably some other codes detect if extensions are enabled or not. This also dynamically updates __all__ whenever extensions are enabled or disabled.
They're not pretty, but they get the job done.
- The behavior for dtype=None was incorrect. - Fix an error with axis=-1, include_initial=True.
This should be good to go. The dlpack and astype changes can be updated once NumPy 2.1 is released. The only question is whether I should leave 2022.12 as the default for now or go ahead and switch it. |
The strict library should be explicitly working around all the bad promotion issues from NumPy 1.26.
A lot of this failure on CI, which I've never seen before:
I can't reproduce it locally. I guess we should just disable that health check. |
I opened data-apis/array-api-tests#277 about the data_too_large health check issue. For now, I've just disabled that health check in the test suite so this should pass now. |
This will not be enabled by default by can be enabled with
set_array_api_strict_flags(api_version='2023.12')
or using__array_namespace__(api_version='2023.12')
. It will issue a warning that not all functions are implemented and it hasn't been tested.My plan here is to just wrap the functions that are already in NumPy, and maybe add some of the straightforward inspection APIs. There's no test suite support yet, so any features missing from NumPy will probably need to wait.
This issue has a list of the new APIs that need to be added for 2023.12. data-apis/array-api-tests#249