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] Raise an error when adding hists of different storage types. #464

Open
JohanWulff opened this issue Nov 8, 2022 · 0 comments
Open

Comments

@JohanWulff
Copy link

Describe the bug

Adding two hists of different storage types just results in having an empty hist without raising an error:

Steps to reproduce

import numpy as np
from hist import Hist
import hist
a_hist = hist.Hist(hist.axis.Regular(3, -1, 1), storage=hist.storage.Int64())
a_hist.sum()

0.0

b_hist = hist.Hist(hist.axis.Regular(3, -1, 1), storage=hist.storage.Double())
b_hist.fill(np.random.normal(size=1000))
b_hist.sum()

681.0

a_hist += b_hist
a_hist.sum()

0.0

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

No branches or pull requests

1 participant