Allow both 'bool' and 'Bool_t' type conversions to numpy booleans#20192
Allow both 'bool' and 'Bool_t' type conversions to numpy booleans#20192vepadulano merged 2 commits intoroot-project:masterfrom
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
guitargeek
left a comment
There was a problem hiding this comment.
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.
guitargeek
left a comment
There was a problem hiding this comment.
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!
dpiparo
left a comment
There was a problem hiding this comment.
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