Skip to content
This repository has been archived by the owner on Jun 21, 2022. It is now read-only.

Commit

Permalink
Merge pull request #405 from scikit-hep/issue-404
Browse files Browse the repository at this point in the history
Fixes #404.
  • Loading branch information
jpivarski authored Nov 15, 2019
2 parents 5b445b4 + 01daf64 commit 03072b0
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
Binary file added tests/samples/issue404.root
Binary file not shown.
4 changes: 4 additions & 0 deletions tests/test_issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,3 +246,7 @@ def test_issue399(self):
a = t["Histos.histograms1D"].array()
for i in range(t.numentries):
assert [x.title for x in a[i]] == [b"Primary Hits", b"Primary Loss", b"Energy Loss", b"Primary Hits per Element", b"Primary Loss per Element", b"Energy Loss per Element"]

def test_issue404(self):
t = uproot.open("tests/samples/issue404.root")["Beam"]
assert t["Beam.GMAD::BeamBase.beamParticleName"].array().tolist() == [b"proton"]
2 changes: 1 addition & 1 deletion uproot/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def _attachstreamer(self, branch, streamer, streamerinfosmap, isTClonesArray):
members = streamerinfosmap[typename].members

if members is not None:
for subbranch in branch._fBranches:
for subbranch in branch.itervalues(recursive=True):
name = subbranch._fName
if name.startswith(branch._fName + b"."): # drop parent branch's name
name = name[len(branch._fName) + 1:]
Expand Down
2 changes: 1 addition & 1 deletion uproot/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import re

__version__ = "3.10.11"
__version__ = "3.10.12"
version = __version__
version_info = tuple(re.split(r"[-\.]", __version__))

Expand Down

0 comments on commit 03072b0

Please sign in to comment.