Merged
Conversation
jrbourbeau
reviewed
May 25, 2020
Member
jrbourbeau
left a comment
There was a problem hiding this comment.
Thanks for the PR @andrewfulton9! The current set of changes definitely fix things for the 1-d case. But I'm still observing hanging behavior when re-chunking an empty array which is greater than 1-d. For example:
import dask.array as da
array = da.array([[], []])
array.rechunk()Perhaps instead of exiting early if x.shape == (0,), we could avoid re-chunking any axis with a length of 0?
Contributor
Author
|
Ah good point, I should have checked multidimensional arrays. I'll get that fixed up |
Member
|
No worries! Thanks for taking on the multidimensional case too Also, apologies for the numba-related CI test failures. They're unrelated and are being addressed in #6236. |
Member
|
LGTM, thanks @andrewfulton9! Merging. |
galipremsagar
pushed a commit
to galipremsagar/dask
that referenced
this pull request
May 29, 2020
* fixes rechunk infinite loop * fixes formatting * removes debugging print statements * changes to deal with multidimensional empty arrays
2 tasks
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.
Currently if you try to rechunk an empty array, you will get caught in an infinite loop. This PR fixes that by simply returning the array when the
rechunkmethod is called ifshape == (0,).Example of failing code:
black dask/flake8 dask