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

[BUG] non-uniform rebinning does not work with Weight() storage #971

Closed
Saransh-cpp opened this issue Jan 23, 2025 · 0 comments · Fixed by #972
Closed

[BUG] non-uniform rebinning does not work with Weight() storage #971

Saransh-cpp opened this issue Jan 23, 2025 · 0 comments · Fixed by #972

Comments

@Saransh-cpp
Copy link
Member

Steps to reproduce

import boost_histogram as bh

hist = bh.Histogram(bh.axis.Regular(10, 0.0, 1.0), storage=bh.storage.Weight())
hist.fill(0.9)

rebin = bh.rebin(groups=[1,2,3,4])
hist[::rebin].view()

would result in -

UFuncTypeError: ufunc 'add' did not contain a loop with signature matching types (dtype([('value', '<f8'), ('variance', '<f8')]), dtype([('value', '<f8'), ('variance', '<f8')])) -> None

Working on it!

Also see scikit-hep/hist#345 (comment)

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

Successfully merging a pull request may close this issue.

1 participant