On Mon, May 5, 2008 at 8:26 PM, Jerin Schneider <[EMAIL PROTECTED]> wrote: > It seems that every matrix I make is immutable. when I call > matrix.immutable, it says it's not. But if I call matrix[3].immutable, it > says it is immutable. So the matrix is not immutable, but the rows (or > vectors) are?
Yes. Matrices are mutable by default but a copy of the row is immutable. This is to make sure you *can't accidentaly do sage: a = matrix(QQ, 2, [1..4]) sage: a[0][1] = 5 sage: a[0,1] 2 which is a good thing. Note matrices are *NOT* just lists of rows, and that a[0] say does *not* give the first row of the matrix. It gives a vector that equals the first row. To set position 0,1 of a, do sage: a[0,1] = 5 -- William --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---