On 12/3/11 4:16 PM, Justin C. Walker wrote:
Q=matrix(ZZ,6)
U=Q
U[1,1]=4
Q


Uh, I thought you wanted to use copy, which actually does copy the matrix:


sage: Q=matrix(ZZ,2)
sage: U=copy(Q)
sage: U[1,1]=4
sage: U
[0 0]
[0 4]
sage: Q
[0 0]
[0 0]

You don't need to use deepcopy to copy a matrix.

Thanks,

Jason


--
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to