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: add support for new RNTuple switches #1218

Merged
merged 5 commits into from
May 17, 2024
Merged

Conversation

ariostas
Copy link
Collaborator

This PR fixes reading RNTuple switch data, which is now 96 bits as opposed to 64 bits. These are used to encode std::variant types. I re-enabled a test for them, which I didn't realize was being skipped.

Also, as a minor thing, I disabled another RNTuple test because the test file takes a relatively long file to download, and sometimes the server seems to get stuck.

@ariostas ariostas marked this pull request as draft May 16, 2024 15:20
@ariostas
Copy link
Collaborator Author

I'm going to make it a bit cleaner by using structured numpy.dtype for switches. I'll mark it for review when it's ready.

@ariostas ariostas marked this pull request as ready for review May 16, 2024 15:42
@ariostas
Copy link
Collaborator Author

Thanks @jpivarski, it's definitely a lot nicer with a structured numpy dtype than reading a switch as 3 int32. Now it's ready for review.

@ariostas ariostas requested a review from jpivarski May 16, 2024 15:45
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.

Oh, yeah: now that I see the context, the structured dtype is much better. I thought we were talking about three equal-sized integers, which can just as easily be a reshaped array, but it's one 64-bit integer and one 32-bit integer. Reinterpreting as a structured array does the same job with no intermediate arrays, so it's both cleaner to read and more efficient.

Go ahead and merge if you have no additional changes to make!

@ariostas ariostas merged commit e4cd29a into main May 17, 2024
24 checks passed
@ariostas ariostas deleted the ariostas/fix_rntuple_switch branch May 17, 2024 13:26
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.

None yet

2 participants