Updates:
        Labels: Milestone-Release0.6.4

Comment #1 on issue 1250 by ondrej.certik: incorrect output at sympy.latex()
http://code.google.com/p/sympy/issues/detail?id=1250

Indeed, thanks for the bug report.

Here is what one gets in the lates sympy:

In [1]: A = Symbol('A')

In [2]: B = Symbol('B')

In [3]: M = Matrix(
    ...: [0,A,B,0]
    ...: ,[-1,0,0,0]
    ...: ,[0,0,0,1]
    ...: ,[0,1,-A,0])
sympy/matrices/matrices.py:137: UserWarning: Deprecated constructor, use  
brackets:
Matrix(([0, A, B, 0], [-1, 0, 0, 0], [0, 0, 0, 1], [0, 1, -A, 0]))
   warnings.warn("Deprecated constructor, use brackets: Matrix(%s)" %  
str(mat))

In [4]: M
Out[4]:
⎡0   A  B   0⎤
⎢            ⎥
⎢-1  0  0   0⎥
⎢            ⎥
⎢0   0  0   1⎥
⎢            ⎥
⎣0   1  -A  0⎦

In [5]: M2 = (M + M.transpose())/2

In [6]: M2
Out[6]:
⎡                 A     B            ⎤
⎢   0      -1/2 + ─     ─        0   ⎥
⎢                 2     2            ⎥
⎢                                    ⎥
⎢       A                            ⎥
⎢-1/2 + ─     0         0       1/2  ⎥
⎢       2                            ⎥
⎢                                    ⎥
⎢   B                               A⎥
⎢   ─         0         0     1/2 - ─⎥
⎢   2                               2⎥
⎢                                    ⎥
⎢                          A         ⎥
⎢   0        1/2     1/2 - ─     0   ⎥
⎣                          2         ⎦

In [7]: latex(M2)
Out[7]:
'$\\left(\\begin{smallmatrix}0 & - \\frac{1}{2} + \\frac{1}{2} A &  
\\frac{1}{2
} B & 0\\\\- \\frac{1}{2} + \\frac{1}{2} A & 0 & 0 &  
\\frac{1}{2}\\\\\\frac{1}
{2} B & 0 & 0 & \\frac{1}{2} - \\frac{1}{2} A\\\\0 & \\frac{1}{2} &  
\\frac{1}{
2} - \\frac{1}{2} A & 0\\end{smallmatrix}\\right)$'


So the terms are interchanged, but I guess this bug is still there.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
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