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

DOC: solve_discrete_lyapunov equation puts transpose in wrong place #5752

Closed
arvoelke opened this issue Jan 22, 2016 · 1 comment
Closed
Milestone

Comments

@arvoelke
Copy link

The equation in the docs says A' X A - X = -Q when it should really be A X A' - X = -Q. This makes it not only consistent with the literature, but also matches the computed result:

from scipy.linalg import solve_discrete_lyapunov

a = np.asarray([[1, 0.5], [1, 0]])
q = np.asarray([[1, 0], [0, 1]])

x = solve_discrete_lyapunov(a, q)
print np.allclose(np.dot(a.T, np.dot(x, a)) - x, -q)
print np.allclose(np.dot(a, np.dot(x, a.T)) - x, -q)

The first line (which uses the currently documented equation) prints False, while the second (which puts the transpose in the correct place) prints True.

@pv
Copy link
Member

pv commented Jan 31, 2016

gh-5781

@pv pv added this to the 0.18.0 milestone Jan 31, 2016
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