Skip to content

[WIP] ENH: dask+cupy, dask+sparse etc. namespaces #270

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

crusaderky
Copy link
Contributor

@crusaderky crusaderky commented Mar 6, 2025

Very early prototype inspired by https://github.com/mdhaber/marray/

FYI @mdhaber @lucascolley

Demo

>>> import dask.array as da, cupy as cp
>>> from array_api_compat import array_namespace
>>> x = da.from_array(cp.asarray(0))
>>> xp = array_namespace(x)
>>> xp
<module 'array_api_compat.dask.array.cupy'>
>>> y = xp.arange(10)
>>> y
dask.array<arange, shape=(10,), dtype=int64, chunksize=(10,), chunktype=cupy.ndarray>
>>> type(y.compute())
cupy.ndarray
>>> array_namespace(y) is xp
True

@crusaderky crusaderky force-pushed the dask_wrap_namespace branch 3 times, most recently from 7f39b03 to 592e31a Compare March 6, 2025 00:35
@crusaderky crusaderky force-pushed the dask_wrap_namespace branch 3 times, most recently from 57d168e to f8aa551 Compare April 1, 2025 08:30
@crusaderky crusaderky force-pushed the dask_wrap_namespace branch 2 times, most recently from 330c006 to 927c9a3 Compare April 10, 2025 09:45
@ev-br ev-br added the enhancement New feature or request label Apr 15, 2025
@crusaderky crusaderky force-pushed the dask_wrap_namespace branch from 927c9a3 to 8b77b6e Compare April 15, 2025 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants