Skip to content

Clarify the future of the cupy.array_api submodule and the array_api_compat.cupy alternative #8470

@ogrisel

Description

@ogrisel

Description

https://docs.cupy.dev/en/stable/reference/array_api.html recommends the use of the experimental cupy.array_api submodule as a mirror to the numpy.array_api experimental module.

In NumPy, the numpy.array_api experimental submodule introduced in 1.6 (or 1.5, I am not sure) has been removed in 2.0 as the top-level numpy module itself is expected to be array API compliant.

In scikit-learn, we test against both cupy.array_api and cupy directly via the array_api_compat.cupy wrapper. However cupy.array_api is not fully compliant with the latest version of the standard and we might need to invest efforts in maintaining our own wrapper (for instance to add the clip function). However we would rather not maintain a compat wrapper for something that is meant go away in the future.

Idea or request for content

If cupy is to mirror numpy, then I would also expect the cupy.array_api submodule to go away in the future. If this is the case, I think it would be worth updating the doc to state this explicitly and instead point to array_api_compat.cupy as a pragmatic way for early array API users / consuming libraries to address the remaining compliance issues with the top level cupy module.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions