Fix get_chunked_array_type rejecting arrays of the same chunk manager - #11565
Open
IMGillusion wants to merge 2 commits into
Open
Fix get_chunked_array_type rejecting arrays of the same chunk manager#11565IMGillusion wants to merge 2 commits into
IMGillusion wants to merge 2 commits into
Conversation
Compare the chunk managers that recognise each array instead of the exact array types, so a dask array and a subclass of dask.Array are no longer reported as a mix of chunked array types. A real mix of frameworks (e.g. dask and cubed) still raises TypeError. Fixes pydata#11539
|
Thank you for opening this pull request! It may take us a few days to respond here, so thank you for being patient. |
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does
get_chunked_array_typecompared the exacttype()of each array, so twoarray classes handled by the same chunk manager (e.g.
dask.Arrayand asubclass of it, or any manager whose
is_chunked_arrayis anisinstancecheck against several classes) were reported as a mix ofchunked array types:
The check now resolves which chunk manager recognises each array and
requires all arrays to be handled by the same manager. A genuine mix of
frameworks (e.g. a dask array together with a cubed array) still raises
TypeError.What the PR achieves
Fixes #11539
To test this PR