From a0793b24ccb62c131228547e77e7c9f825a2aeeb Mon Sep 17 00:00:00 2001 From: Tamas Gal <tgal@km3net.de> Date: Fri, 11 Sep 2020 15:14:29 +0200 Subject: [PATCH] Fix indexing when numpy integers are used --- km3io/rootio.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/km3io/rootio.py b/km3io/rootio.py index ffaf69f..34f0b68 100644 --- a/km3io/rootio.py +++ b/km3io/rootio.py @@ -171,7 +171,7 @@ class Branch: def __len__(self): if not self._index_chain: return len(self._branch) - elif isinstance(self._index_chain[-1], int): + elif isinstance(self._index_chain[-1], (int, np.int32, np.int64)): return 1 else: return len( -- GitLab