Skip to content

[Python][UHI] Extend TH1 equality operator to consider additional properties #19061

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

siliataider
Copy link
Contributor

This Pull request:

Changes or fixes:

The equality operator for ROOT histograms now compares the following properties:

  • Histogram type (including dimension).
  • Histogram kind.
  • Shape (number of bins per axis).
  • Bin contents array.
  • Sum-of-weights-squared array.
  • Axes properties.

Checklist:

  • tested changes locally
  • updated the docs (if necessary)

This PR fixes #19038

@siliataider siliataider self-assigned this Jun 17, 2025
@siliataider siliataider requested review from Copilot and vepadulano and removed request for dpiparo, vepadulano and Copilot June 17, 2025 09:41
Copilot

This comment was marked as off-topic.

Copy link
Member

@vepadulano vepadulano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but let's wait for discussion with @guitargeek

@siliataider
Copy link
Contributor Author

@guitargeek I did not add checks for properties related to the GUI. We should discuss if those are part of determining whether 2 ROOT histograms are equal or not

Copy link

Test Results

    19 files      19 suites   3d 19h 14m 36s ⏱️
 2 856 tests  2 856 ✅ 0 💤 0 ❌
52 746 runs  52 746 ✅ 0 💤 0 ❌

Results for commit e91727f.

@dpiparo
Copy link
Member

dpiparo commented Jun 19, 2025

A discussion might be needed. I personally lean towards not considering aspects such as colours or marker type part of the equality: they are not related to the statistical properties of the histos and in any case those will not be part of the new histograms...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Python] TH1 equality operator pythonization not appropriate for ROOT histograms
3 participants