fix: only check length against empty form in ak.from_buffers if it is known#3714
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
ariostas
left a comment
There was a problem hiding this comment.
This indeed fixes my issues in Uproot
|
The documentation preview is ready to be viewed at http://preview.awkward-array.org.s3-website.us-east-1.amazonaws.com/PR3714 |
This is naturally skipping a "validity check" that's impossible in this scenario but that's always the case for virtual arrays. You need to assume during array creation that the buffers that are passed in are correct. So the responsibility falls on the person passing the buffers, but that's the best we can do since we cannot look at the data at the from buffers stage. |
We cannot check if the length is zero in the case of
EmptyFormif the recursion earlier set it to unknown length. We skip the check in that case.