Skip to content

Commit 0b78e30

Browse files
authored
[BUGFIX] kalman: Always initialize self.Sigma and self.x_hat (#562)
1 parent 9a3f5a8 commit 0b78e30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

quantecon/kalman.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,11 +69,11 @@ def __init__(self, ss, x_hat=None, Sigma=None):
6969

7070
def set_state(self, x_hat, Sigma):
7171
if Sigma is None:
72-
Sigma = np.identity(self.ss.n)
72+
self.Sigma = np.identity(self.ss.n)
7373
else:
7474
self.Sigma = np.atleast_2d(Sigma)
7575
if x_hat is None:
76-
x_hat = np.zeros((self.ss.n, 1))
76+
self.x_hat = np.zeros((self.ss.n, 1))
7777
else:
7878
self.x_hat = np.atleast_2d(x_hat)
7979
self.x_hat.shape = self.ss.n, 1

0 commit comments

Comments
 (0)