Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 2020 by chr.schu...@gmx.de: Symbols & Matrices
http://code.google.com/p/sympy/issues/detail?id=2020

Hi,

I was wondering whether it is planned to implement matrix support for symbols. I often use symbolic calculation for matrix equations where I would like to do things like:

import sympy
a = sympy.Symbol('a', commutative=False, shape=(3,1)) # works
b = sympy.Symbol('b', commutative=False, shape=(3,1)) # works
c = sympy.Symbol('c') # works

eq1 = a-sympy.Matrix([c,0,0]) # unsupported operand type(s) for -: 'Symbol' and 'Matrix'

eq2 = sympy.sympify('transpose(a)*b') # returns b*transpose(a)!

eq2.subs({a:sympy.Matrix([c,0,0]),b: sympy.Matrix([0,2,0])}) # sympify: NotImplementedError('matrix support')

# Workaraound
sympy.sympify(str(eq2), {'a': sympy.Matrix([c,0,0]), 'b': sympy.Matrix([0,2,0]), 'transpose': sympy.Matrix.transpose})

etc.

At the moment I find myself writing 'dirty' workarounds for each functionality. Is there any plan on how matrix support could be achieved? If so, I would be more than happy to help implement it.

Regards,

Christian

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

Reply via email to