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

fix: support UnknownLength in ak.types.ArrayType #2031

Merged
merged 3 commits into from
Dec 22, 2022

Conversation

agoose77
Copy link
Collaborator

@agoose77 agoose77 commented Dec 22, 2022

Fixes #1937

@agoose77 agoose77 changed the title fix: support UnknownLength in ak.types.ArrayType fix: support UnknownLength in ak.types.ArrayType Dec 22, 2022
@agoose77 agoose77 temporarily deployed to docs-preview December 22, 2022 14:48 — with GitHub Actions Inactive
@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #2031 (12b9ea8) into main (fff5e7c) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files
Impacted Files Coverage Δ
src/awkward/highlevel.py 74.51% <100.00%> (ø)
src/awkward/types/arraytype.py 93.10% <100.00%> (-0.23%) ⬇️

@agoose77 agoose77 temporarily deployed to docs-preview December 22, 2022 15:48 — with GitHub Actions Inactive
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.

Earlier today, @ioanaif said she was planning on doing this one, but it wasn't assigned at the time that you started it, and it is a pretty small fix.

Fortunately, there are many more issues to fix. :)

Comment on lines +18 to +24
if not (
(ak._util.is_integer(length) and length >= 0)
or length is ak._typetracer.UnknownLength
):
raise ak._errors.wrap_error(
ValueError(
"{} 'length' must be of a positive integer, not {}".format(
"{} 'length' must be a non-negative integer or unknown length, not {}".format(
Copy link
Member

Choose a reason for hiding this comment

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

Good catch!

@jpivarski
Copy link
Member

I've been putting a little time between approval and merging by collecting these into a browser window, reviewing them one after another, and then going back to the beginning to merge them. Now I'm back around to the end of the list, so I'll merge this.

@jpivarski jpivarski merged commit c7a1b79 into main Dec 22, 2022
@jpivarski jpivarski deleted the agoose77/fix-unknown-length-type branch December 22, 2022 18:42
@agoose77
Copy link
Collaborator Author

Ah, sorry @ioanaif! I didn't assign the issue to myself because I noticed that it was fairly small. I'll make a note to be better at always assigning things I'm working on.

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.

Typetracers with unknown length can't print their type
2 participants