Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
finam
Manage
Activity
Members
Labels
Plan
Issues
31
Issue boards
Milestones
Code
Merge requests
3
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
9bd6dc71
Commit
9bd6dc71
authored
2 years ago
by
Martin Lange
Browse files
Options
Downloads
Patches
Plain Diff
add docstring, update changelog
parent
33b62e8e
No related branches found
No related tags found
1 merge request
!105
Weighted sum merger
Pipeline
#122457
passed with stages
in 2 minutes and 39 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGELOG.md
+5
-0
5 additions, 0 deletions
CHANGELOG.md
src/finam/modules/mergers.py
+11
-1
11 additions, 1 deletion
src/finam/modules/mergers.py
with
16 additions
and
1 deletion
CHANGELOG.md
+
5
−
0
View file @
9bd6dc71
...
...
@@ -5,6 +5,11 @@
### Data and metadata rework
*
Outputs check compatibility between metadata of inputs if there is more than one target input (!104)
*
Add data tools function
`check_units(lhs, rhs)`
to check for convertibility (!105)
### Components
*
Add
`merger.WeightedSum`
for aggregation of multiple inputs
## [v0.4.0-rc.2]
...
...
This diff is collapsed.
Click to expand it.
src/finam/modules/mergers.py
+
11
−
1
View file @
9bd6dc71
...
...
@@ -6,7 +6,17 @@ from ..tools.log_helper import LogError
class
WeightedSum
(
AComponent
):
"""
Merges inputs by weighted sum
"""
"""
Merges inputs by weighted sum
Parameters
----------
inputs : list(str)
Base input names; will create two inputs for each entry:
"
<name>
"
and
"
<name>_weight
"
start : datetime.datetime
Starting time, for initial data exchange
grid : GridBase or None
Expected input grid specification; tries to obtain grid specs from inputs if set to None
"""
def
__init__
(
self
,
inputs
,
start
,
grid
=
None
):
super
().
__init__
()
...
...
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