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
e611f521
Commit
e611f521
authored
2 years ago
by
Martin Lange
Browse files
Options
Downloads
Plain Diff
Merge branch 'optimize-units' into 'main'
Optimize unit checks See merge request
!228
parents
16a5dd38
c73f1b52
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!228
Optimize unit checks
Pipeline
#133672
passed with stages
in 6 minutes and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/finam/data/tools.py
+0
-9
0 additions, 9 deletions
src/finam/data/tools.py
with
0 additions
and
9 deletions
src/finam/data/tools.py
+
0
−
9
View file @
e611f521
...
...
@@ -87,7 +87,6 @@ def to_xarray(data, name, info, time_entries=1, force_copy=False):
name
=
name
,
info
=
info
,
overwrite_name
=
True
,
check_units_equivalent
=
False
,
)
if
equivalent_units
(
info
.
units
,
data
):
if
force_copy
:
...
...
@@ -383,7 +382,6 @@ def check(
name
,
info
,
overwrite_name
=
False
,
check_units_equivalent
=
True
,
):
"""
Check if data matches given info.
...
...
@@ -398,8 +396,6 @@ def check(
Info associated with the data.
overwrite_name : bool
Overwrites the name in the data instead of comparing both names
check_units_equivalent : bool
Check equivalence of data and info units.
Raises
------
...
...
@@ -443,11 +439,6 @@ def check(
f
"
check: given data has incompatible units.
"
f
"
Got
{
get_units
(
xdata
)
}
, expected
{
units
}
.
"
)
if
check_units_equivalent
and
not
equivalent_units
(
units
,
xdata
):
raise
FinamDataError
(
f
"
check: given data has non-equivalent units.
"
f
"
Got
{
get_units
(
xdata
)
}
, expected
{
units
}
.
"
)
def
_check_shape
(
xdata
,
grid
):
...
...
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