rlabbe / filterpy

Python Kalman filtering and optimal estimation library. Implements Kalman filter, particle filter, Extended Kalman filter, Unscented Kalman filter, g-h (alpha-beta), least squares, H Infinity, smoothers, and more. Has companion book 'Kalman and Bayesian Filters in Python'.
MIT License
3.31k stars 617 forks source link

Corrected shape of self.sigmas_h #167

Closed Prokhozhijj closed 6 years ago

Prokhozhijj commented 6 years ago

Fixed again bug #129

File "g:\proj\python\filterpy\filterpy\kalman\UKF.py", line 605, in batch_filter self.update(z, r, UT=UT) File "g:\proj\python\filterpy\filterpy\kalman\UKF.py", line 450, in update zp, self.S = UT(self.sigmas_h, self.Wm, self.Wc, R, self.z_mean, self.residual_z) File "g:\proj\python\filterpy\filterpy\kalman\unscented_transform.py", line 104, in unscented_transform x = np.dot(Wm, sigmas) # dot = \Sigma^n_1 (W[k]*Xi[k]) ValueError: shapes (5,) and (1,5) not aligned: 5 (dim 0) != 1 (dim 0)