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

test: cover the failure modes of unflatten #1930

Merged
merged 2 commits into from
Nov 30, 2022
Merged

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Nov 30, 2022

ak.unflatten throws a secondary error if a 2D ragged array is passed for counts. This PR fixes that by catching the else case, and adds tests to try out the various improper count values.


📚 The documentation for this PR will be available at https://awkward-array.readthedocs.io/en/agoose77-fix-ndim-unflatten/ once Read the Docs has finished building 🔨

Copy link
Member

@jpivarski jpivarski left a comment

Choose a reason for hiding this comment

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

That's right; counts can only be integers or option-of-integers. Anything else should raise an error.

It's ready to merge!

@agoose77 agoose77 enabled auto-merge (squash) November 30, 2022 23:29
@agoose77 agoose77 merged commit 1157d22 into main Nov 30, 2022
@agoose77 agoose77 deleted the agoose77/fix-ndim-unflatten branch November 30, 2022 23:34
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