-
Notifications
You must be signed in to change notification settings - Fork 34
Add functions such as take
to existing Array API spec if not implemented yet?
#23
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
I'd say yes, that should be a goal. Taking over the implementation from cupy/cupy#7432 would be good I'd think. |
I'd say changes like this are definitely in scope. We will add it eventually once we add the 2023 version of the spec, but we can add it sooner if it would help. And as Ralf pointed out, we also still need to update numpy.array_api and cupy.array_api with 2023 functionality. |
Let's add it now indeed - scikit-learn was needing |
Yes, sorry I meant to type 2022 above, not 2023. |
The main challenge here is there aren't any tests for NumPy and CuPy already have Presently this compat library doesn't wrap or do anything existing array API compatible libraries like numpy.array_api. It just returns them as-is. So there are a few options here:
The difference for these two is really between using |
This is already being done for
I'm not clear on the need for this request for |
If the goal is to remove It does raise the question about how versioning works here. Consider: # custom_array_library implements v2021 spec, but not v2022.
import custom_array_library.array_api as xp
import array_api_compat
X = xp.asarray([1.0, 2.0])
xp = array_api_compat.get_namespace(X)
# Which spec is `xp` supporting? v2021 or v2022?
xp The easiest solution is to error on |
From the weekly call, we think it's best to error in |
So for now (i.e., in #25) I am not going to do anything about
Regarding the version, I think the primary benefit of it is to get a better error message when using an array API namespace that is too old. Virtually every change in the spec is additive. Meaning there's no reason for something like The bigger question here is about For this compat library, we are taking a much more pragmatic approach. |
Implemented |
Based on the discussion, I don't think there's anything to do here, since |
Should
array-api-compat
"update" the namespace for existing Array API arrays to the most recent spec? For example:The text was updated successfully, but these errors were encountered: