Status: Accepted
Owner: [email protected]
Labels: Type-Enhancement Priority-Medium Matrices EasyToFix

New issue 2269 by [email protected]: Symplification of transformation P applying to diagonal matrix.
http://code.google.com/p/sympy/issues/detail?id=2269


At least in the rational number entries case, so that all the entries are integers.

i.e., it does not matter if you choose v or a*v as your eigenvector, so you can just as easily have:

In [1]: a = Matrix([[7, -4, 0], [8, -5, 0], [6, -6, 3]])

In [2]: a.diagonalize()
Out[2]:
⎛⎡2/3  1  0⎤, ⎡-1  0  0⎤⎞
⎜⎢         ⎥  ⎢        ⎥⎟
⎜⎢4/3  1  0⎥  ⎢0   3  0⎥⎟
⎜⎢         ⎥  ⎢        ⎥⎟
⎝⎣ 1   0  1⎦  ⎣0   0  3⎦⎠

(this is what is returned now), as

In [1]: a = Matrix([[7, -4, 0], [8, -5, 0], [6, -6, 3]])

In [2]: a.diagonalize()
Out[2]:
⎛⎡2  1  0⎤, ⎡-1  0  0⎤⎞
⎜⎢       ⎥  ⎢        ⎥⎟
⎜⎢4  1  0⎥  ⎢0   3  0⎥⎟
⎜⎢       ⎥  ⎢        ⎥⎟
⎝⎣3  0  1⎦  ⎣0   0  3⎦⎠

what is needed.

Algorithm might be like this: check if a column has rational
obtain lowest common multiple through the sympys "ilcm" function, and multiply column by it.

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to