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

LinAlgError: Singular matrix #16

Open
raul-parada opened this issue Dec 30, 2020 · 1 comment
Open

LinAlgError: Singular matrix #16

raul-parada opened this issue Dec 30, 2020 · 1 comment

Comments

@raul-parada
Copy link

By executing the line 'K = (P*JH.T) * np.linalg.inv(S)' I get always an error:

The original S is matrix([[matrix([[6371.]]), matrix([[6371.]])],
[matrix([[6371.]]), matrix([[6371.]])]], dtype=object)

TypeError: No loop matching the specified signature and casting was found for ufunc inv

if I convert s to float64 S = S.astype(np.float64) the content of S is

matrix([[6371., 6371.],
[6371., 6371.]])

LinAlgError: Singular matrix

How can I solve this issue?

@AydinAltun
Copy link

from numpy.linalg import inv
K=(PH.T)inv(HPH.T + R)#Kalman Gain

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