Description
I'd like to request writing support for profile hists that are coming from hist/boost-histogram. The use case I ran into was merging some root files containing a variety of histograms. My procedure was roughly:
- Read file
- Retrieve hists, and convert using to_hist to take advantage of the
__add__
functionality already implemented - Add the hists
- Write the merged hists to file
The issue is in step 4. This works fine for standard histograms, and from the docs I understand that it should work for TProfile objects that aren't converted to hist (eg. just read by uproot, and still contained in a Model), but it doesn't work after I've done the conversion. Looking into the exception that's raised
the NotImplementedError
obviously suggests that profiles intentionally aren't supported at the moment, but the ValueError
suggests that perhaps they were intended to be? In any case, adding support for writing profiles would be much appreciated, and would make merging hists a bit easier (this would be helpful because hadd
isn't always available). Thanks!