Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
I
ICARTT Python Package
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
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
MBEES
ICARTT Python Package
Commits
14bd3092
Commit
14bd3092
authored
3 years ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
any and all built-ins take generator expression
parent
41e1c58f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6
code refactor
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/icartt/dataset.py
+2
-2
2 additions, 2 deletions
src/icartt/dataset.py
with
2 additions
and
2 deletions
src/icartt/dataset.py
+
2
−
2
View file @
14bd3092
...
...
@@ -163,7 +163,7 @@ class DataStore2110(collections.UserDict):
ivarvalue
=
vmiss_to_npnan
(
kwargs
[
self
.
ivarname
],
self
.
missvals
[
self
.
ivarname
])
# this is an AUX line
if
any
(
[
x
in
self
.
auxvarnames
for
x
in
kwargs
.
keys
()
]
):
# TODO: any (all as well) do not require a comprehension; pure generator expression works fine
if
any
(
x
in
self
.
auxvarnames
for
x
in
kwargs
.
keys
()):
# and we create the whole dataset if needed
if
not
ivarvalue
in
self
.
data
.
keys
():
self
.
data
[
ivarvalue
]
=
{
...
...
@@ -173,7 +173,7 @@ class DataStore2110(collections.UserDict):
self
.
data
[
ivarvalue
][
"
AUX
"
].
add
(
**
kwargs
)
# this is a DEP line
if
any
(
[
x
in
self
.
dvarnames
for
x
in
kwargs
.
keys
()
]
):
# TODO: see above: remove [ ]
if
any
(
x
in
self
.
dvarnames
for
x
in
kwargs
.
keys
()):
if
not
self
.
ibvarname
in
kwargs
.
keys
():
raise
Exception
(
"
Need independent (bounded) variable data.
"
)
...
...
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