Kalman filter implementation in python