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
f4b85c9c
Commit
f4b85c9c
authored
3 years ago
by
Florian Obersteiner
Browse files
Options
Downloads
Patches
Plain Diff
minor: comments/docstring/etc.
parent
1b57967d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!15
updated normal comments handling
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/icartt/dataset.py
+9
-9
9 additions, 9 deletions
src/icartt/dataset.py
with
9 additions
and
9 deletions
src/icartt/dataset.py
+
9
−
9
View file @
f4b85c9c
...
...
@@ -72,7 +72,7 @@ class DataStore1001:
:param newData: data to be added
:type newData: numpy.ndarray
"""
if
not
type
(
newData
)
is
np
.
ndarray
:
if
not
type
(
newData
)
is
np
.
ndarray
:
# TODO: isinstance(arr, np.ndarray)?
raise
ArgumentError
(
"
Input data needs to be numpy ndarray.
"
)
if
newData
.
dtype
.
names
is
None
:
try
:
...
...
@@ -151,7 +151,7 @@ class DataStore2110(collections.UserDict):
ivarValue
=
float
(
auxds
[
self
.
ivar
.
shortname
])
self
.
data
[
ivarValue
]
=
{
"
AUX
"
:
auxds
,
"
DEP
"
:
depds
}
def
add
(
self
,
newAuxData
,
newDepData
):
auxds
=
DataStore1001
(
self
.
ivar
,
self
.
auxvars
)
depds
=
DataStore1001
(
self
.
ibvar
,
self
.
dvars
)
...
...
@@ -301,9 +301,9 @@ class Variable:
:rtype: str
"""
descstr
=
[
str
(
self
.
shortname
),
str
(
self
.
units
)]
if
not
self
.
standardname
is
None
:
if
self
.
standardname
is
not
None
:
descstr
+=
[
str
(
self
.
standardname
)]
if
not
self
.
longname
is
None
:
if
self
.
longname
is
not
None
:
descstr
+=
[
str
(
self
.
longname
)]
return
splitChar
.
join
(
descstr
)
...
...
@@ -402,8 +402,8 @@ class Dataset:
def
times
(
self
):
"""
Time steps of the data
:return:
list
of time steps
:rtype:
list
:return:
numpy array
of time steps
:rtype:
numpy.ndarray
"""
if
self
.
data
.
data
is
None
or
self
.
independentVariable
is
None
:
return
np
.
datetime64
(
"
NaT
"
)
...
...
@@ -614,7 +614,7 @@ class Dataset:
# line 15 + nvar - Special comments (Notes of problems or special
# circumstances unique to this file. An example would be comments/problems
# associated with a particular flight.).
self
.
specialComments
=
[
f
.
readline
(
doSplit
=
False
)
for
i
in
range
(
0
,
nscom
)]
self
.
specialComments
=
[
f
.
readline
(
doSplit
=
False
)
for
_
in
range
(
nscom
)]
# line 16 + nvar + nscom - Number of Normal comments (i.e., number of
# additional lines of SUPPORTING information: Integer value indicating the
...
...
@@ -855,7 +855,7 @@ class Dataset:
# TODO: this could be more meaningful
return
"
ICARTT Dataset string representation
"
# TODO: why is init comming last?
def
__init__
(
self
,
f
=
None
,
loadData
=
True
,
splitChar
=
"
,
"
,
format
=
Formats
.
FFI1001
):
"""
Constructor method
"""
self
.
format
=
format
...
...
@@ -910,4 +910,4 @@ class Dataset:
self
.
readHeader
(
splitChar
)
if
loadData
:
self
.
endDefineMode
()
self
.
readData
(
splitChar
)
self
.
readData
(
splitChar
)
\ No newline at end of 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