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

feat: allow rebinning by passing edges or a new axis #977

Merged
merged 10 commits into from
Jan 31, 2025

Conversation

andrzejnovak
Copy link
Member

@andrzejnovak andrzejnovak commented Jan 31, 2025

  • feat: allow rebinning by passing edges (or directly a hist.axis)
  • fix: preserve flow when rebinning

@github-actions github-actions bot added the needs changelog Might need a changelog entry label Jan 31, 2025
@andrzejnovak andrzejnovak force-pushed the rebins branch 2 times, most recently from cf9e34e to bac117a Compare January 31, 2025 12:43
@andrzejnovak andrzejnovak changed the title rebins feat: allow rebinning by passing edges or a new axis Jan 31, 2025
@andrzejnovak
Copy link
Member Author

Hi @henryiii @Saransh-cpp . I've added the requested rebin by passing axis as well now. I also noticed the existing implementation was skipping flow bins so I've added that back in (keeps total sumw/sumw2 same). Should be good to review.

While testing, there's one more thing I noticed, but not sure if easily fixable. The repr changes between the original and the transformed hist. Something in the metadata copying is not 1-to-1.
image

@andrzejnovak andrzejnovak force-pushed the rebins branch 2 times, most recently from da3578b to 06278e9 Compare January 31, 2025 19:38
@henryiii henryiii merged commit 789d325 into scikit-hep:develop Jan 31, 2025
17 checks passed
@henryiii
Copy link
Member

Thanks!

@henryiii henryiii mentioned this pull request Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs changelog Might need a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants