Fixed in https://github.com/sympy/sympy/pull/1121
On Wed, Mar 14, 2012 at 8:53 AM, Matthew Rocklin <[email protected]> wrote: > Hrm, yes, this should probably change. > > Having things the way they are now accelerates a few internal functions. > This acceleration probably isn't worthwhile though given the confusion you > bring up. I'll send in a PR with this change in a bit. > > In general the internals of Matrices were changed around a bit in a recent > commit. Bug reports like this are very useful. > > -Matthew > > On Wed, Mar 14, 2012 at 4:26 AM, Adrian Seyboldt < > [email protected]> wrote: > >> Hello, >> >> When creating a Matrix from another one, no new object is created >> >> m1 = Matrix(2, 2, range(4)) >> m2 = Matrix(m1) >> >> m1 is m2 >> >> returns True, so changing m1 will also change m2. I know I can use >> m1.clone(), but >> since SomeClass() usually creates a new object, this took me rather by >> surprise. >> >> Is this intended behavior? >> >> >> Adrian Seyboldt >> >> -- >> You received this message because you are subscribed to the Google Groups >> "sympy" group. >> To view this discussion on the web visit >> https://groups.google.com/d/msg/sympy/-/kmGB44EhawEJ. >> 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. >> > > -- 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.
