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
18109d69
Verified
Commit
18109d69
authored
8 months ago
by
Tamas Gal
Browse files
Options
Downloads
Patches
Plain Diff
Remove old awkward dependencies and require uproot 5+ and awkward 2+
parent
a5c5443f
No related branches found
Branches containing commit
Tags
v1.2.3
Tags containing commit
1 merge request
!86
Remove online support, uproot3 and update to awkward2 and uproot5
Pipeline
#52867
failed
8 months ago
Stage: test
Stage: coverage
Stage: doc
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
setup.cfg
+2
-4
2 additions, 4 deletions
setup.cfg
src/km3io/tools.py
+7
-21
7 additions, 21 deletions
src/km3io/tools.py
with
9 additions
and
25 deletions
setup.cfg
+
2
−
4
View file @
18109d69
...
...
@@ -37,10 +37,8 @@ packages = find:
install_requires
=
docopt
numba>=0.50
awkward>=1.9
awkward0>=0.15.5
uproot3>=3.11.1
uproot>=4.2.2
awkward>=2
uproot>=5
setuptools_scm
python_requires
=
>=3.6
include_package_data
=
True
...
...
This diff is collapsed.
Click to expand it.
src/km3io/tools.py
+
7
−
21
View file @
18109d69
...
...
@@ -307,41 +307,27 @@ def mask(arr, sequence=None, startend=None, minmax=None, atleast=None):
elif
atleast
is
not
None
:
np_array
=
_mask_atleast
(
ak
.
Array
(
layout
),
np
.
array
(
atleast
))
return
ak
.
layout
.
NumpyArray
(
np_array
)
elif
isinstance
(
layout
,
(
ak
.
layout
.
ListArray32
,
ak
.
layout
.
ListArrayU32
,
ak
.
layout
.
ListArray64
,
),
):
return
ak
.
contents
.
NumpyArray
(
np_array
)
elif
isinstance
(
layout
,
ak
.
contents
.
ListArray
):
if
len
(
layout
.
stops
)
==
0
:
content
=
recurse
(
layout
.
content
)
else
:
content
=
recurse
(
layout
.
content
[:
np
.
max
(
layout
.
stops
)])
return
type
(
layout
)(
layout
.
starts
,
layout
.
stops
,
content
)
elif
isinstance
(
layout
,
(
ak
.
layout
.
ListOffsetArray32
,
ak
.
layout
.
ListOffsetArrayU32
,
ak
.
layout
.
ListOffsetArray64
,
),
):
elif
isinstance
(
layout
,
ak
.
contents
.
ListOffsetArray
):
content
=
recurse
(
layout
.
content
[:
layout
.
offsets
[
-
1
]])
return
type
(
layout
)(
layout
.
offsets
,
content
)
elif
isinstance
(
layout
,
ak
.
layout
.
RegularArray
):
elif
isinstance
(
layout
,
ak
.
contents
.
RegularArray
):
content
=
recurse
(
layout
.
content
)
return
ak
.
layout
.
RegularArray
(
content
,
layout
.
size
)
return
ak
.
contents
.
RegularArray
(
content
,
layout
.
size
)
else
:
raise
NotImplementedError
(
repr
(
arr
))
layout
=
ak
.
to_layout
(
arr
,
allow_record
=
True
,
allow_other
=
False
)
layout
=
ak
.
to_layout
(
arr
,
allow_record
=
True
)
return
ak
.
Array
(
recurse
(
layout
))
...
...
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