fix: TStreamerLoop code generation should make an array #1277
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.
In #1275, @yixianz found that reading data with a TStreamerLoop did not raise an error (including the number of bytes check at the end of the object), but the data was a single scalar, rather than an array.
We've never seen an instance of TStreamerLoop before:
uproot5/src/uproot/streamers.py
Line 1200 in aa8b94f
and (my guess for) the generated code was only a little wrong:
instead of
That is, I knew that it should read as many objects as in the referred-to member (
fNp
), but for some reason overwrote a single object instead of making an array of objects.This PR fixes that. @yixianz's example file is now a part of the regular test suite.