Skip to content
Snippets Groups Projects
Commit ebc24b5c authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Fall back to object itself if index_chain is empty

parent 2a3c1cdf
No related branches found
No related tags found
1 merge request!39WIP: Resolve "uproot4 integration"
......@@ -30,6 +30,8 @@ class cached_property:
def unfold_indices(obj, indices):
"""Unfolds an index chain and returns the corresponding item"""
if not indices:
return obj
original_obj = obj
for depth, idx in enumerate(indices):
try:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment