You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since array_namespace(x, use_compat=None) now returns plain numpy, but released NumPy still has incompatibilities with the standard, we want to use use_compat=True in SciPy. However, since array-api-strict isn't wrapped, array_namespace throws a ValueError, so we have to use:
array-api-strict isn't special here, this goes for any standard-compliant library. It would be nice to have an option to do this without having to catch an exception. Alternatively, we could just wait until NumPy is fully compatible with the standard before making the native namespace the default, but I'm not sure how feasible that is as the standard continues to change.
Well I think we're going to have to get rid of the "numpy 2.0 doesn't get wrapped at all" logic because there actually are some differences from the standard in NumPy 2.0 and even NumPy 2.1 (which weren't caught for some reason #167). I thought it would simplify things to not wrap NumPy 2.0 at all, but I think instead we are going to just have a separate, simpler wrapper namespace for it.
asmeurer
added a commit
to asmeurer/array-api-compat
that referenced
this issue
Jul 30, 2024
Since
array_namespace(x, use_compat=None)
now returns plainnumpy
, but released NumPy still has incompatibilities with the standard, we want to useuse_compat=True
in SciPy. However, since array-api-strict isn't wrapped,array_namespace
throws aValueError
, so we have to use:array-api-strict isn't special here, this goes for any standard-compliant library. It would be nice to have an option to do this without having to catch an exception. Alternatively, we could just wait until NumPy is fully compatible with the standard before making the native namespace the default, but I'm not sure how feasible that is as the standard continues to change.
x-ref scipy/scipy#21264
The text was updated successfully, but these errors were encountered: