diff --git a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th2.py b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th2.py index 7691247a94cc0..547a48a8ff849 100644 --- a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th2.py +++ b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_th2.py @@ -83,7 +83,9 @@ def _TH2Poly_AddBin(self, *args, **kwargs): # "TH2PolyBin", Does not derive from TH2 "TProfile2D", # "TProfile2PolyBin", Derives from TH2PolyBin which does not derive from TH2 - "TProfile2Poly", + # "TProfile2Poly", # Like TH2Poly (its base), its bins are polygons addressed by a + # # single global bin number, not an (i, j) grid, so it does not fit + # # the rectangular UHI plotting/indexing model. ] for klass in _th2_derived_classes_to_pythonize: diff --git a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_uhi/__init__.py b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_uhi/__init__.py index 26dd4fe1f67f1..901d234f3b647 100644 --- a/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_uhi/__init__.py +++ b/bindings/pyroot/pythonizations/python/ROOT/_pythonization/_uhi/__init__.py @@ -51,7 +51,6 @@ def _add_indexing_features(klass: Any) -> None: "TH3C": _values_by_copy, "TProfile": _values_by_copy, "TProfile2D": _values_by_copy, - "TProfile2Poly": _values_by_copy, "TProfile3D": _values_by_copy, } diff --git a/bindings/pyroot/pythonizations/test/uhi_indexing.py b/bindings/pyroot/pythonizations/test/uhi_indexing.py index 2618e925df935..1ff3ccf867b84 100644 --- a/bindings/pyroot/pythonizations/test/uhi_indexing.py +++ b/bindings/pyroot/pythonizations/test/uhi_indexing.py @@ -16,7 +16,7 @@ def _special_setting(hist): # For these classes, SetBinContent works differently than for other classes, # as in it does not set the bin content to the specified value, but does some other calculations # for that, these classes will be tested differently - return isinstance(hist, (ROOT.TProfile, ROOT.TProfile2D, ROOT.TProfile2Poly, ROOT.TProfile3D)) + return isinstance(hist, (ROOT.TProfile, ROOT.TProfile2D, ROOT.TProfile3D)) def _get_index_for_dimension(hist, index): diff --git a/bindings/pyroot/pythonizations/test/uhi_plotting.py b/bindings/pyroot/pythonizations/test/uhi_plotting.py index ca215b3a27980..0842838793ec9 100644 --- a/bindings/pyroot/pythonizations/test/uhi_plotting.py +++ b/bindings/pyroot/pythonizations/test/uhi_plotting.py @@ -12,9 +12,7 @@ def _not_writable(hist): # For these classes, the values() method always returns a copy so writable=True is not supported. - return isinstance( - hist, (ROOT.TH1C, ROOT.TH2C, ROOT.TH3C, ROOT.TProfile, ROOT.TProfile2D, ROOT.TProfile2Poly, ROOT.TProfile3D) - ) + return isinstance(hist, (ROOT.TH1C, ROOT.TH2C, ROOT.TH3C, ROOT.TProfile, ROOT.TProfile2D, ROOT.TProfile3D)) class TestTH1Plotting: