filterpy
filterpy copied to clipboard
Shape of z incorrect when None
I initialize z to [[None], [None], [None]] in several places. It should never be 2 dimensional by default. Use z_reshape anywhere this is done to ensure it is the right shape.
This mostly causes a problem when using Saver.to_array(), as that cannot deal with a list of zs of different dimensions, so that is a good unit test to write.
I know this happens in the KalmanFilter class, but I'm sure it happens anywhere I store self.z in any of the classes.