Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
km3io
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
km3py
km3io
Commits
ebc24b5c
Commit
ebc24b5c
authored
4 years ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Fall back to object itself if index_chain is empty
parent
2a3c1cdf
No related branches found
No related tags found
1 merge request
!39
WIP: Resolve "uproot4 integration"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
km3io/tools.py
+2
-0
2 additions, 0 deletions
km3io/tools.py
with
2 additions
and
0 deletions
km3io/tools.py
+
2
−
0
View file @
ebc24b5c
...
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment