Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
32
Issue boards
Milestones
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Monitor
Service Desk
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FINAM
finam
Commits
e1efdc4d
Commit
e1efdc4d
authored
1 year ago
by
Sebastian Müller
🐈
Browse files
Options
Downloads
Patches
Plain Diff
io_helper: rename io-object to io to satisfy pylint
parent
068ee167
No related branches found
No related tags found
1 merge request
!258
Grid mask support
Pipeline
#178816
passed with stages
in 4 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/finam/tools/io_helper.py
+12
-12
12 additions, 12 deletions
src/finam/tools/io_helper.py
with
12 additions
and
12 deletions
src/finam/tools/io_helper.py
+
12
−
12
View file @
e1efdc4d
...
...
@@ -4,13 +4,13 @@ import numpy as np
from
..interfaces
import
IInput
,
IOutput
def
pull_compressed
(
i
nput
,
time
):
def
pull_compressed
(
i
o
,
time
):
"""
Pull compressed data from an Input object.
Parameters
----------
i
nput
: IInput
i
o
: IInput
The Input object to pull data from.
time : :class:`datetime <datetime.datetime>`
Simulation time to get the data for.
...
...
@@ -23,21 +23,21 @@ def pull_compressed(input, time):
Raises
------
ValueError
If i
nput
is not an IInput instance.
If i
o
is not an IInput instance.
"""
if
not
isinstance
(
i
nput
,
IInput
):
msg
=
"
pull_compressed: Given i
npu
t is not an Input
object
.
"
if
not
isinstance
(
i
o
,
IInput
):
msg
=
"
pull_compressed: Given i
o-objec
t is not an
I
Input
instance
.
"
raise
ValueError
(
msg
)
return
i
nput
.
info
.
grid
.
to_compressed
(
i
nput
.
pull_data
(
time
))
return
i
o
.
info
.
grid
.
to_compressed
(
i
o
.
pull_data
(
time
))
def
push_compressed
(
o
utput
,
time
,
data
,
nodata
=
np
.
nan
):
def
push_compressed
(
i
o
,
time
,
data
,
nodata
=
np
.
nan
):
"""
Push compressed data to an Output object.
Parameters
----------
o
utput
: IOutput
i
o : IOutput
The Output object to push data to.
time : :class:`datetime <datetime.datetime>`
Simulation time of the data set.
...
...
@@ -50,9 +50,9 @@ def push_compressed(output, time, data, nodata=np.nan):
Raises
------
ValueError
If o
utput
is not an IOutput instance.
If
i
o is not an IOutput instance.
"""
if
not
isinstance
(
o
utput
,
IOutput
):
msg
=
"
push_compressed: Given
outpu
t is not an Output
object
.
"
if
not
isinstance
(
i
o
,
IOutput
):
msg
=
"
push_compressed: Given
io-objec
t is not an
I
Output
instance
.
"
raise
ValueError
(
msg
)
o
utput
.
push_data
(
o
utput
.
info
.
grid
.
from_compressed
(
data
,
nodata
),
time
)
i
o
.
push_data
(
i
o
.
info
.
grid
.
from_compressed
(
data
,
nodata
),
time
)
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