On Tue, Dec 20, 2011 at 9:00 PM, Bastian Weber <[email protected] > wrote:
> Hello, > > > Currently I am dealing with common subexpressions of a matrix. > > In [1]: from sympy import * > > In [2]: from sympy.abc import * > > In [3]: M = Matrix([a**2 + b, a**2 + b+ c]) > > In [4]: v1, v2 = cse(M) > > In [5]: type(v2) > Out[5]: <type 'list'> > > > My question is: wouldn't it be more intuitive if v2 is a matrix with the > same shape as M? Of course, one could convert v2 easily but it would be > more convenient without this step and I see no reason why a list should be > returned if a Matrix was passed. > > You can see what you think about the following pull request: https://github.com/sympy/sympy/pull/875 ```python >>> m = Matrix([a**2 + b, a**2 + b+ c]) >>> r,e=cse(m) >>> e [ x1] [c + x1] ``` -- 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.
