Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug in KalmanFilter.compute #7

Closed
maxclaey opened this issue Sep 17, 2019 · 2 comments
Closed

Bug in KalmanFilter.compute #7

maxclaey opened this issue Sep 17, 2019 · 2 comments

Comments

@maxclaey
Copy link

I think there is a bug in KalmanFilter.compute, more specifically on line 522 of kalmanfilter.py. I noticed that when I tried to perform KalmanFilter.em in a scenario where observations consist of more than 1 variable, the code crashes due to broadcasting errors.

On line 522, result.filtered.gains is initialized as follows:
result.filtered.gains = np.empty((n_vars, n_measurements, n_states, n_states))
while I think it should be:
result.filtered.gains = np.empty((n_vars, n_measurements, n_states, n_obs))

Would it be possible to have a look, and hotfix if needed?
Many thanks in advance!

oseiskar added a commit that referenced this issue Sep 17, 2019
oseiskar added a commit that referenced this issue Sep 17, 2019
oseiskar added a commit that referenced this issue Sep 17, 2019
@oseiskar
Copy link
Owner

You're absolutely right. Thanks for reporting! Now fixed in v. 1.0.1

@maxclaey
Copy link
Author

Perfect, thanks for the quick resolution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants