Repository navigation
Better error message for length of array with unknown chunk sizes - #8436
Merged
Merged
Conversation
douglasdavis
force-pushed
the
len-on-unknown-size
branch
from
December 3, 2021 19:04
1e0cbfa to
d3f7cd2
Compare
2 of 3 tasks
jrbourbeau
reviewed
Dec 3, 2021
jrbourbeau
left a comment
Member
There was a problem hiding this comment.
Thanks @douglasdavis -- apologies for the delayed review
Comment on lines
+1407
to
+1410
| try: | ||
| return int(sum(self.chunks[0])) | ||
| except (TypeError, ValueError): | ||
| pass |
Member
There was a problem hiding this comment.
It looks like we're catching multiple failure modes here. I wonder if we might be more explicit and do something like
Line 1739 in d3f7cd2
instead where we check is there are any np.nans in self.chunks[0].
Member
Author
There was a problem hiding this comment.
I agree this is easier to understand
douglasdavis
force-pushed
the
len-on-unknown-size
branch
from
December 7, 2021 15:57
d3f7cd2 to
dbbbf80
Compare
Member
Author
|
Thanks @jrbourbeau! Just addressed your comments. Let me know if anything else comes to mind. |
jrbourbeau
approved these changes
Dec 7, 2021
jrbourbeau
left a comment
Member
There was a problem hiding this comment.
Thanks @douglasdavis, this is a nice improvement. Will merge once CI finishes
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.
[ ] Closes #xxxxpre-commit run --all-filesDiscovered this while tinkering with
lenof collections for some dask-awkward dev. Previous behavior:with this PR: