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
Merge requests
!127
Doc-tests
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Doc-tests
doc-tests
into
main
Overview
0
Commits
15
Pipelines
18
Changes
14
Merged
Martin Lange
requested to merge
doc-tests
into
main
2 years ago
Overview
0
Commits
15
Pipelines
18
Changes
2
Expand
Add testing for code examples in docs
Edited
2 years ago
by
Martin Lange
👍
0
👎
0
Merge request reports
Viewing commit
9a943858
Show latest version
2 files
+
11
−
11
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
9a943858
fix numbered lists to rst syntax
· 9a943858
Martin Lange
authored
2 years ago
docs/source/finam-book/development/adapters.rst
+
5
−
5
Options
@@ -78,8 +78,8 @@ File ``src/scale.py``:
In :meth:`.Adapter._get_data`, we:
1
. Pull the input for the requested ``time``
1
. Multiply the input by ``scale`` and return the result
#
. Pull the input for the requested ``time``
#
. Multiply the input by ``scale`` and return the result
Time-dependent ``TimeInterpolation`` adapter
--------------------------------------------
@@ -242,9 +242,9 @@ In :meth:`.Adapter._get_data`, we can now do the interpolation whenever data is
In :meth:`.Adapter._get_data`, the following happens:
1
. If only one data entry was received so far, we can't interpolate and simply return the available data. Otherwise...
1
. Calculate ``dt`` as the relative position of ``time`` in the available data interval (in range [0, 1])
1
. Interpolate and return the data
#
. If only one data entry was received so far, we can't interpolate and simply return the available data. Otherwise...
#
. Calculate ``dt`` as the relative position of ``time`` in the available data interval (in range [0, 1])
#
. Interpolate and return the data
Note that, although we use :class:`datetime <datetime.datetime>` when calculating ``dt``, we get a scalar output.
Due to ``dt`` being relative, time units cancel out here.
Loading