Description
Based on an interaction I just had with a user: the getting started: writing objects to a file page does include various examples of how to write histograms to a root file. It even includes weighted ones with hist
, but only shows how to handle a histogram that is being filled on the spot. It is not obvious from there how a user would take an existing piece of histogram information (in the form of counts per bin + uncertainty) and turn that into a TH1 in a file.
The hist
documentation quick start also does not cover that. The pattern
hist[...] = np.stack([yields, stdev**2], axis=-1)
is mentioned in the boost-histogram
docs (via scikit-hep/boost-histogram#421) but a user is unlikely to get this far I imagine.
Perhaps it makes sense to mention this pattern somewhere more prominently. I am not sure where the best spot would be, but wanted to raise this to see if others had ideas (and if you agree that this would be useful to do).