hist
hist copied to clipboard
[BUG] Axis label propagation when wrapping histogram by `hist.Hist`
Describe the bug
When wrapping an existing histogram object by hist.Hist()
, I expected that I can set metadata (such as axis labels) in the hist.Hist()
call. This currently does not work, see reproducer below.
Am I using the interface in the wrong way here?
Steps to reproduce
import boost_histogram as bh
import hist
boost_h = bh.Histogram(bh.axis.Regular(2, 0, 1))
print(hist.Hist(boost_h, label="abc").axes[0].label)
-> prints Axis 0
relevant versions:
boost-histogram 1.3.2
hist 2.7.2