scikit-hep/hist

[BUG] cannot add weighted and unweighted histograms

goi42 opened this issue · 0 comments

goi42 commented

Adding an unweighted histogram to a weighted one simply returns the weighted histogram.

Reproducer:

import hist

assert hist.__version__ == "2.6.1"
ax = hist.axis.Regular(5, 0, 5)
h_d = hist.Hist(ax, storage=hist.storage.Double())
h_w = hist.Hist(ax, storage=hist.storage.Weight())
values = [1, 2, 3, 4]
h_d.fill(values)
h_w.fill(values)
assert h_w == h_w + h_d