Skip to content
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

BUG: dask: asarray should not materialize the graph #235

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

crusaderky
Copy link
Contributor

@crusaderky crusaderky commented Jan 15, 2025

  • Fix performance bug where xp.asarray applied to a dask array materializes the graph.
  • Support copy=False iff the argument is already a dask array.
  • Add test framework for this and other dask-specific functions.

@crusaderky crusaderky force-pushed the dask_asarray branch 3 times, most recently from c554947 to a46f8a8 Compare January 15, 2025 19:42
@crusaderky crusaderky force-pushed the dask_asarray branch 4 times, most recently from 2053f7f to 8f8ea9c Compare January 15, 2025 22:31
@crusaderky crusaderky changed the title da.asarray should not materialize the graph BUG: da.asarray should not materialize the graph Jan 16, 2025
@crusaderky crusaderky force-pushed the dask_asarray branch 2 times, most recently from 517d0c8 to ebfefc9 Compare January 16, 2025 14:55
@crusaderky crusaderky changed the title BUG: da.asarray should not materialize the graph BUG: dask: asarray should not materialize the graph Jan 16, 2025
@crusaderky crusaderky force-pushed the dask_asarray branch 4 times, most recently from 7676d2f to e38c2db Compare January 16, 2025 15:26
@crusaderky
Copy link
Contributor Author

@ev-br this is ready for review and merge

Copy link
Contributor

@ev-br ev-br left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The testing pattern is a bit bizzare, I've to admit. Would be nice if there was a way to make a little more "boring" and explicit.

@crusaderky
Copy link
Contributor Author

The testing pattern is a bit bizzare, I've to admit. Would be nice if there was a way to make a little more "boring" and explicit.

I've replaced the fixture with a context manager to make it clearer.

Copy link
Contributor

@ev-br ev-br left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @crusaderky !

@ev-br ev-br merged commit 9442237 into data-apis:main Jan 16, 2025
42 checks passed
@crusaderky crusaderky deleted the dask_asarray branch January 17, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants