-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[python][UHI] Implement Slicing in TH1 and adapt the UHI backend and tests #18735
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
9e29340 to
61272a7
Compare
silverweed
left a comment
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.
I know I wasn't a requested reviewer but I have a couple of comments :)
Test Results 19 files 19 suites 3d 15h 49m 12s ⏱️ Results for commit abc7b47. ♻️ This comment has been updated with latest results. |
vepadulano
left a comment
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.
Thank you a lot for this prompt effort to improve the implementation according to bleeding edge testing! I have a few quick remarks for a first iteration of the review
vepadulano
left a comment
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 for pushing for this! Just a few quick pass-by comments
bindings/pyroot/pythonizations/python/ROOT/_pythonization/_uhi.py
Outdated
Show resolved
Hide resolved
bindings/pyroot/pythonizations/python/ROOT/_pythonization/_uhi.py
Outdated
Show resolved
Hide resolved
bindings/pyroot/pythonizations/python/ROOT/_pythonization/_uhi.py
Outdated
Show resolved
Hide resolved
89d21aa to
ee76b59
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.
A couple of last comments :)
silverweed
left a comment
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, thanks!
|
Thanks a lot @vepadulano and @silverweed for the thorough rounds of review, I really appreciate it :) |
|
@siliataider , CMSSW DQM bin-by-bin comparison tests are failing with error [a] ( see cms-sw/cmssw#49452 ) . We see this error in both of our ROOT master based IBs and Ibs with ROOT 6.36. I guess the change here is causing this failure. Is there something we should fix on our side or this change introduce a bug? [a] |
|
@siliataider , should I open a github issue if there is no quick answer/solution the the problem I mentioned above |
|
hi @smuzaffar , thanks for reporting this, if you don't need to access/compare the contents of the underflow/overflow bins, you can use |
|
@siliataider , see #20511 |
This Pull request:
Changes or fixes:
Previously, slicing was implemented at the pythonization level: when slicing a histogram, the values within the specified slice were kept and the ones outside were set to 0, without resizing the sliced axis (leading to inconsistencies..).
This PR implements the slicing logic in
TH1directly, adapting the pythonizations to make use of the new internal functions.Other changes are made to enhance the interface and fully comply with the UHI specifications, improvements can be summarized here:
h[0:2, 0:2] = np.array([[42], [3]])).Checklist: