File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
bindings/pyroot/pythonizations/python/ROOT/_pythonization/_uhi Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -112,9 +112,11 @@ def _hasWeights(hist: Any) -> bool:
112112def _axes (self ) -> Tuple [Union [PlottableAxisContinuous , PlottableAxisDiscrete ], ...]:
113113 return tuple (PlottableAxisFactory .create (_get_axis (self , i )) for i in range (self .GetDimension ()))
114114
115- # TODO this is not correct?
116115def _kind (self ) -> Kind :
117- return Kind .COUNT if not _hasWeights (self ) else Kind .MEAN
116+ # TProfile -> MEAN, everything else -> COUNT
117+ if self .__class__ .__name__ .startswith ("TProfile" ):
118+ return Kind .MEAN
119+ return Kind .COUNT
118120
119121
120122def _shape (hist : Any , include_flow_bins : bool = True ) -> Tuple [int , ...]:
@@ -129,6 +131,7 @@ def _values_default(self) -> np.typing.NDArray[Any]: # noqa: F821
129131 return ret .reshape (_shape (self ), order = "F" )[tuple ([slice (1 , - 1 )] * len (_shape (self )))]
130132
131133
134+ # Special case for TH*C and TProfile*
132135def _values_by_copy (self , include_flow_bins = False ) -> np .typing .NDArray [Any ]: # noqa: F821
133136 from itertools import product
134137
You can’t perform that action at this time.
0 commit comments