Skip to content

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

Merged
ev-br merged 2 commits into
data-apis:mainfrom
crusaderky:dask_asarray
Jan 16, 2025
Merged

BUG: dask: asarray should not materialize the graph#235
ev-br merged 2 commits into
data-apis:mainfrom
crusaderky:dask_asarray

Conversation

@crusaderky

@crusaderkycrusaderky commented Jan 15, 2025

Copy link
Copy Markdown
Contributor
  • 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
crusaderkyforce-pushed the dask_asarray branch 3 times, most recently from c554947 to a46f8a8CompareJanuary 15, 2025 19:42
@crusaderky
crusaderkyforce-pushed the dask_asarray branch 4 times, most recently from 2053f7f to 8f8ea9cCompareJanuary 15, 2025 22:31
@crusaderkycrusaderky changed the title da.asarray should not materialize the graphBUG: da.asarray should not materialize the graphJan 16, 2025
@crusaderky
crusaderkyforce-pushed the dask_asarray branch 2 times, most recently from 517d0c8 to ebfefc9CompareJanuary 16, 2025 14:55
@crusaderkycrusaderky changed the title BUG: da.asarray should not materialize the graphBUG: dask: asarray should not materialize the graphJan 16, 2025
@crusaderky
crusaderkyforce-pushed the dask_asarray branch 4 times, most recently from 7676d2f to e38c2dbCompareJanuary 16, 2025 15:26
@crusaderky

Copy link
Copy Markdown
ContributorAuthor

@ev-br this is ready for review and merge

@ev-brev-br left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
ContributorAuthor

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.

@ev-brev-br left a comment

Copy link
Copy Markdown
Member

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:mainJan 16, 2025
@crusaderky
crusaderky deleted the dask_asarray branch January 17, 2025 14:30
Sign up for freeto 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

@crusaderky@ev-br