Hi,
The following code:
Lambda = Matrix(5, 2, lambda i, j: Symbol("Lambda_%d%d" % (i, j)))
Upsilon = eye(2)
Upsilon[0,1] = Upsilon[1,0] = Symbol("Upsilon_01")
Sigma = Lambda * Upsilon * Lambda.transpose()
Sigma == Sigma.transpose() # WTF
False
disputes the fact that Sigma is necessarily symmetric, and thus an
exception would be thrown by any function that first checks the
symmetry of a matrix.
It appears as if this is some (lack of) simplification issue
(Sigma[0,1] - Sigma[1,0]) == 0
False
Sigma[0,1] - Sigma[1,0]
Λ₁₀⋅(Λ₀₀ + Λ₀₁⋅Υ₀₁) + Λ₁₁⋅(Λ₀₁ + Λ₀₀⋅Υ₀₁) - Λ₀₀⋅(Λ₁₀ + Λ₁₁⋅Υ₀₁) - Λ₀₁⋅
(Λ₁₁ + Λ₁₀⋅Υ₀₁)
Does anyone have a suggestion about how best to convince Sympy that
Sigma is symmetric?
Thanks,
Ben
--
You received this message because you are subscribed to the Google Groups
"sympy" 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?hl=en.