On Sat, May 12, 2012 at 6:07 AM, Matthew Rocklin <[email protected]> wrote: > You're right in that they both redundantly serve as immutable storage > classes. I can envision a system where they're merged. > > On the other hand one can think about them quite differently. Tuples contain > Basics, IMs contain Exprs (not sure this is actually enforced.) Most
And Basic can contain anything (e.g. Basic(*range(3)) contains 3 ints, not Integers). But Basic is not slicable. Tuple could subclass from IM with 1xN shape; perhaps it needs to print differently >>> ImmutableMatrix(1,6,range(6)) [0, 1, 2, 3, 4, 5] >>> Tuple(*range(6)) (0, 1, 2, 3, 4, 5) It already slices the same: >>> Tuple(*range(6))[3:5] (3, 4) >>> ImmutableMatrix(1,6,range(6))[3:5] (3, 4) -- 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.
