uproot.behaviors.TH2.TH2
Defined in uproot.behaviors.TH2 on line 14.
| Inheritance order: | 
|---|
- class uproot.behaviors.TH2.TH2
- Behaviors for two-dimensional histograms: descendants of ROOT’s - TH2, not including- TProfile2Dor- TH2Poly.
to_numpy
- TH2.to_numpy(flow=False, dd=False)
- Parameters:
- flow (bool) – If True, include underflow and overflow bins; otherwise, only normal (finite-width) bins are included. 
- dd (bool) – If True, the return type follows numpy.histogramdd; otherwise, it follows numpy.histogram and numpy.histogram2d. 
 
 - Converts the histogram into a form like the ones produced by the NumPy histogram functions. 
name
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.name
- The name of the histogram. 
title
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.title
- The title of the histogram. 
axes
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.axes
axis
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.axis(axis)
- Returns a specified uproot.behaviors.TAxis.TAxis object. - The - axiscan be specified as- a non-negative integer: - 0is the first axis,- 1is the second, and- 2is the third.
- a negative integer: - -1is the last axis,- -2is the second-to-last, and- -3is the third-to-last.
- a string: - "x"is the first axis,- "y"is the second, and- "z"is the third
 - (assuming that the histogram dimension supports a given - axis).
weighted
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.weighted
- True if the histogram has weights ( - fSumw2); False otherwise.
kind
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.kind
values
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.values(flow=False)
- Parameters:
- flow (bool) – If True, include underflow and overflow bins before and after the normal (finite-width) bins. 
 - Bin contents as a 1, 2, or 3 dimensional - numpy.ndarray. The- numpy.dtypeof this array depends on the histogram type.- Setting - flow=Trueincreases the length of each dimension by two.
errors
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.errors(flow=False)
- Parameters:
- flow (bool) – If True, include underflow and overflow bins before and after the normal (finite-width) bins. 
 - Errors (uncertainties) in the values as a 1, 2, or 3 dimensional - numpy.ndarrayof- numpy.float64.- If - fSumw2(weights) are available, they will be used in the calculation of the errors. If not, errors are assumed to be the square root of the values.- Setting - flow=Trueincreases the length of each dimension by two.
variances
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.variances(flow=False)
- Parameters:
- flow (bool) – If True, include underflow and overflow bins before and after the normal (finite-width) bins. 
 - Variances (uncertainties squared) in the values as a 1, 2, or 3 dimensional - numpy.ndarrayof- numpy.float64.- If - fSumw2(weights) are available, they will be used in the calculation of the variances. If not, variances are assumed to be equal to the values.- Setting - flow=Trueincreases the length of each dimension by two.
counts
Inherited from uproot.behaviors.TH1.Histogram.
to_boost
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.to_boost(metadata=None, axis_metadata=None)
- Parameters:
- metadata (dict of str → str) – Metadata to collect (keys) and their C++ class member names (values). 
- axis_metadata (dict of str → str) – Metadata to collect from each axis. 
 
 - Converts the histogram into a - boost-histogramobject.
to_hist
Inherited from uproot.behaviors.TH1.Histogram.
- TH2.to_hist(metadata=None, axis_metadata=None)
- Parameters:
- metadata (dict of str → str) – Metadata to collect (keys) and their C++ class member names (values). 
- axis_metadata (dict of str → str) – Metadata to collect from each axis. 
 
 - Converts the histogram into a - histobject.