From 8b38c49acc233228d4fed32a6d4f77f057f8eb2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20R=C3=BCbenach?= Date: Mon, 16 Dec 2019 17:46:13 +0100 Subject: [PATCH] Make TH3 writeable --- uproot_methods/convert.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/uproot_methods/convert.py b/uproot_methods/convert.py index ed08d96..c46917c 100644 --- a/uproot_methods/convert.py +++ b/uproot_methods/convert.py @@ -50,6 +50,9 @@ def types(cls, obj): elif any(x == ("uproot_methods.classes.TH2", "Methods") or x == ("TH2", "Methods") for x in types(obj.__class__, obj)): return (None, None, "uproot.write.objects.TH", "TH") + elif any(x == ("uproot_methods.classes.TH3", "Methods") or x == ("TH3", "Methods") for x in types(obj.__class__, obj)): + return (None, None, "uproot.write.objects.TH", "TH") + else: raise TypeError("type {0} from module {1} is not writeable by uproot".format(obj.__class__.__name__, obj.__class__.__module__))