> >> 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. > > Pythonic code should be based on interfaces. All that Tuple provides is an iterator. Matrix can do that. The other minor differences make sense to be added to Matrix. That is why I think we should not have two classes.
Besides, in mathematica you have just lists, and build you matrices out of lists. It is beautifully simple. -- 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.
