[sympy] possible Matrix constructor bug

2012-03-14 Thread Adrian Seyboldt
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

Re: [sympy] possible Matrix constructor bug

2012-03-14 Thread Matthew Rocklin
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 aroun

Re: [sympy] possible Matrix constructor bug

2012-03-14 Thread Matthew Rocklin
Fixed in https://github.com/sympy/sympy/pull/1121 On Wed, Mar 14, 2012 at 8:53 AM, Matthew Rocklin 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