sympy icon indicating copy to clipboard operation
sympy copied to clipboard

DomainMatrix will modify lists used for its construction -- intended?

Open smichr opened this issue 6 months ago • 10 comments

I am not sure that the mutation of the instantiating lists for a DomainMatrix is intended:

>>> l = [1,2]
>>> DomainMatrix([l],(1,2),ZZ)
DomainMatrix([[1, 2]], (1, 2), ZZ)
>>> _[0,0]=42
>>> l
[42, 2]

compare to Matrix

>>> l = [1,2]
>>> Matrix([l])
Matrix([[1, 2]])
>>> _[0,0]=42
>>> l
[1, 2]

smichr avatar Aug 17 '24 16:08 smichr