Status: Valid
Owner: ----
Labels: Type-Defect Priority-Medium
New issue 3458 by [email protected]: Simultaneous subs fails on non-exprs
http://code.google.com/p/sympy/issues/detail?id=3458
Simultaneous substitution uses Dummy and Symbol, causing Subs on non-Exprs
to fail.
In [1]: X = MatrixSymbol('X', 2, 2)
In [2]: Y = MatrixSymbol('Y', 2, 2)
In [3]: A = MatrixSymbol('A', 3, 3)
In [4]: B = MatrixSymbol('B', 3, 3)
In [5]: expr = X*Y
In [6]: d = {X:A, Y:B}
In [7]: expr.subs(d, simultaneous = True)
AttributeError: 'MatrixSymbol' object has no attribute 'as_base_exp'
The simple solution does not work because the expression is evaluated
half-way through the substitution.
In [8]: expr.subs(d)
ShapeError: Matrices A and Y are not aligned
--
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.