On Dec 3, 2011, at 15:21 , Jason Grout wrote: > 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.
Yup; that was part of my learning curve for the day (see my sage-devel reply). Justin -- Justin C. Walker, Curmudgeon-At-Large, Director Institute for the Enhancement of the Director's Income -------- The path of least resistance: it's not just for electricity any more. -------- -- 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