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

New issue 3355 by ludo.visser: Inconsistent behavior in Matrix()
http://code.google.com/p/sympy/issues/detail?id=3355

Consider the following:
 a = Matrix(2, 1, [q1 - L0*cos(q3), q2 - L0*sin(q3)])
 s = Matrix(3, 1, [q1 - d_com*cos(q3), q2 - d_com*sin(q3), q3])

I'm expecting that 'a' is now a vector (column matrix) of length 2, and 's' a vector of length 3. But:
 >>> a
 [-L0*cos(q3) + q1, -L0*sin(q3) + q2]
 >>> s
 [-L0*mf*cos(q3)/(mf + mh) + q1]
 [-L0*mf*sin(q3)/(mf + mh) + q2]
 [                           q3]

It seems that for any length >2 I get a column matrix, and only for vectors of length 2 the resuls is a row matrix. This is very annoying when calculating Jacobians...

This issue is somewhat related to issue 884, but I filed it as a new issue, because I think this is a bug: the same syntax should give the same result.

I'm using SymPy 0.7.1 with Python 2.7.3

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