Replies: 1 comment
-
NumPy histograms (which aren't even instances of some class—they're just a 2-tuple of bin edges and bin contents) don't have errors. They either set the ROOT fSumw2 to nullptr or make the variances equal to the values (i.e. assuming Poisson statistics). So there isn't a handle for assigning their errors. To control their errors, you should use a histogram class that has errors, such as boost-histogram or hist with the Weight storage. You can use the bin edges and bin contents from NumPy to construct the boost-histogram or hist object. NumPy's bin edges are a Variable axis, although if you know that they are Regular, you can specify the binning as such. You can assign the bin contents with values() and variances(), which can be changed in-place. Then the boost-histogram or hist object can be assigned into the output file in the same way that a NumPy 2-tuple can. See the blue box and following here. |
Beta Was this translation helpful? Give feedback.
-
From a Google Group message,
Beta Was this translation helpful? Give feedback.
All reactions