Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pynumdiff/finite_difference/_finite_difference.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _iterate_first_order(x, dt, num_iterations):
- **x_hat** -- estimated (smoothed) x
- **dxdt_hat** -- estimated derivative of x
"""
w = np.arange(len(x)) / (len(x) - 1) # set up weights, [0., ... 1.0]
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an easier way.

w = np.linspace(0, 1, len(x)) # set up weights, [0., ... 1.0]

# forward backward passes
for _ in range(num_iterations):
Expand Down
4 changes: 2 additions & 2 deletions pynumdiff/kalman_smooth/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""This module implements Kalman filters
"""
from ._kalman_smooth import constant_velocity, constant_acceleration, constant_jerk, known_dynamics, savgol_const_accel
from ._kalman_smooth import constant_velocity, constant_acceleration, constant_jerk, known_dynamics

__all__ = ['constant_velocity', 'constant_acceleration', 'constant_jerk', 'known_dynamics', 'savgol_const_accel'] # So these get treated as direct members of the module by sphinx
__all__ = ['constant_velocity', 'constant_acceleration', 'constant_jerk', 'known_dynamics'] # So these get treated as direct members of the module by sphinx
Loading
Loading