-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Allow both 'bool' and 'Bool_t' type conversions to numpy booleans #20192
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
Conversation
Include all standard C++ fundamental types and the corresponding ROOT C++ types. Connect each of them with the correct Numpy array interface basic type as described at https://numpy.org/doc/stable/reference/arrays.interface.html#object.__array_interface__ .
Test Results 22 files 22 suites 3d 16h 53m 31s ⏱️ For more details on these failures, see this check. Results for commit b778016. ♻️ This comment has been updated with latest results. |
5f919fc to
76f659c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for the PR! I would however suggest to keep the number of bytes consistent, if there is no particular reason to not do so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind, my previous change request. I have now remembered that the size is later appended to the dtype string as the result of sizeof.
So this PR looks good to me, except for the failure on Windows, which can be easily avoided by not deleting the file!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, modulo the small change needed for the win tests
* Use ROOT::RVec as the single data structure to recover all types of values via the Take operation. This helps avoiding issues with vectors of boolean values, whether they are visible as the 'bool' or 'Bool_t' C++ types. * Add a test that checks both 'bool' and 'Bool_t' types. For the latter, it is required to write a TTree branch.
76f659c to
b778016
Compare
Fixes #20081