Am 12.05.2012 02:54, schrieb [email protected]:
On 12 May 2012 02:44, Chris Smith<[email protected]>  wrote:
More generally I do not see why iterables are not sympified into
column matrices. This will make so many special cases in the code go
away.

It's going to look super ugle to print things that have column
matrices (cf rref) so perhaps a row vector would be better.

You are right. But on the other hand vectors are usually presented as
columns and not rows. This should be discussed I suppose.

I'd expect column vectors as columns in prettyprinting.
String output should probably display them like row vectors, with just enough visual feedback that one can distinguish row and column vectors but otherwise the same.

And I am not proposing subclassing from ImmutableMatrix, rather
complete removal of Tuple and adding needed functionality (like
`to_mpmath`) to Matrix.

There are two possible justifications for having two classes: software and mathematics.

The software justification would be if there's code that can work with Tuple but not with a row vector.
That would be a representational difference.

Mathematically, while all vectors can be seen as tuples, not all tuples are row vectors. For example, a tuple of categories isn't.
That would be a semantic difference.

Disclaimer: I do not know whether either of these justifications actually holds for Matrix and Tuple in SymPy.
I'm just not sure whether these aspects have been considered.

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

Reply via email to