Skip to content

Commit 7ad88e4

Browse files
committed
Updated documentation, pylint compliance
1 parent adf10c1 commit 7ad88e4

File tree

7 files changed

+19
-3
lines changed

7 files changed

+19
-3
lines changed

docs/common/common.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ will find useful when you build your filters.
77

88
.. automodule:: filterpy.common
99

10+
-----
11+
12+
13+
.. autofunction:: Saver
14+
15+
1016
-----
1117

1218
.. autofunction:: Q_discrete_white_noise

docs/kalman/Saver.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ This is a helper class designed to allow you to save
55
the state of the Kalman filter for each epoch. Each
66
instance variable is stored in a list when you call save().
77

8+
This class is deprecated as of version 1.3.2 and will
9+
be deleted soon. Instead, see the class
10+
filterpy.common.Saver, which works for any class, not
11+
just a KalmanFilter object.
12+
13+
14+
815
**Example**
916

1017
.. code::

filterpy/common/helpers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def __init__(self, kf, save_current=False,
9898
ignore=()):
9999
""" Construct the save object, optionally saving the current
100100
state of the filter"""
101+
#pylint: disable=too-many-arguments
101102

102103
self._kf = kf
103104
self._DL = defaultdict(list)

filterpy/gh/gh_filter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*- coding: utf-8 -*-
2-
# pylint: disable=C0103, R0913, R0902, C0326, R0903, W1401
2+
# pylint: disable=C0103, R0913, R0902, C0326, R0903, W1401, too-many-lines
33
# disable snake_case warning, too many arguments, too many attributes,
44
# one space before assignment, too few public methods, anomalous backslash
55
# in string

filterpy/hinfinity/hinfinity_filter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def update(self, z):
135135
# force P to be symmetric
136136
self.P = (self.P + self.P.T) / 2
137137

138+
# pylint: disable=bare-except
138139
try:
139140
self.z = z[:]
140141
except:

filterpy/kalman/ensemble_kalman_filter.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22
# pylint: disable=invalid-name, too-many-arguments, too-many-instance-attributes
3+
# pylint: disable=attribute-defined-outside-init
34

45
"""Copyright 2015 Roger R Labbe Jr.
56

filterpy/kalman/kalman_filter.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def update(self, z, R=None, H=None):
369369
# This is more numerically stable
370370
# and works for non-optimal K vs the equation
371371
# P = (I-KH)P usually seen in the literature.
372-
372+
373373
I_KH = self._I - dot(self.K, H)
374374
self.P = dot(dot(I_KH, self.P), I_KH.T) + dot(dot(self.K, R), self.K.T)
375375

@@ -647,6 +647,7 @@ def batch_filter(self, zs, Fs=None, Qs=None, Hs=None,
647647
(xs, Ps, Ks) = kf.rts_smoother(mu, cov, Fs=Fs, Qs=None)
648648
"""
649649

650+
#pylint: disable=too-many-statements
650651
n = np.size(zs, 0)
651652
if Fs is None:
652653
Fs = [self.F] * n
@@ -1598,4 +1599,3 @@ def to_array(self):
15981599
self.ys = np.array(self.ys)
15991600
self.xs_prior = np.array(self.xs_prior)
16001601
self.Ps_prior = np.array(self.Ps_prior)
1601-

0 commit comments

Comments
 (0)