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
136c60b0
Commit
136c60b0
authored
3 years ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
built-in 'vars', readability
parent
5d6ab2ec
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
+7
-7
7 additions, 7 deletions
src/icartt/dataset.py
with
7 additions
and
7 deletions
src/icartt/dataset.py
+
7
−
7
View file @
136c60b0
...
...
@@ -433,17 +433,17 @@ class Dataset:
:return: dictionary of all variables
:rtype: dict of Variable(s)
"""
vars
=
{}
# TODO rename - "vars" is a Python built-in
if
not
self
.
independentVariable
is
None
:
# TODO use "is not None" for readbility
vars
[
self
.
independentVariable
.
shortname
]
=
self
.
independentVariable
if
not
self
.
independentBoundedVariable
is
None
:
# TODO use "is not None" for readbility
vars
[
var
iable
s
=
{}
if
self
.
independentVariable
is
not
None
:
var
iable
s
[
self
.
independentVariable
.
shortname
]
=
self
.
independentVariable
if
self
.
independentBoundedVariable
is
not
None
:
var
iable
s
[
self
.
independentBoundedVariable
.
shortname
]
=
self
.
independentBoundedVariable
vars
=
{
**
vars
,
**
self
.
dependentVariables
,
**
self
.
auxiliaryVariables
}
var
iable
s
=
{
**
var
iable
s
,
**
self
.
dependentVariables
,
**
self
.
auxiliaryVariables
}
return
vars
return
var
iable
s
def
readHeader
(
self
,
splitChar
=
"
,
"
):
"""
Read the ICARTT header (from file)
"""
...
...
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