Re: [sage-devel] Re: Trac #8276: The one of MatrixSpace can be changed !

2010-02-16 Thread Tom Boothby
I very often want to start with the zero_matrix or the identity_matrix and fill in the rest of the matrix.  But I also want the access routines to be fast!  So I vote for copy-on-write semantics, if possible. +1 -- To post to this group, send an email to sage-devel@googlegroups.com To

Re: [sage-devel] Re: Trac #8276: The one of MatrixSpace can be changed !

2010-02-16 Thread Robert Bradshaw
On Feb 15, 2010, at 9:07 PM, Nick Alexander wrote: To have an idea of the usage I went trough the code: - MatrixSpace.identity_matrix implement 1. - MatrixSpace.zero_matrix implement 3. Of course, my opinion is to make those three methods implements 2. :-) +1 for doing option (2). I

Re: [sage-devel] Re: Trac #8276: The one of MatrixSpace can be changed !

2010-02-16 Thread Florent Hivert
On Mon, Feb 15, 2010 at 09:21:00PM -0800, William Stein wrote: On Mon, Feb 15, 2010 at 9:07 PM, Nick Alexander ncalexan...@gmail.com wrote: To have an idea of the usage I went trough the code:  - MatrixSpace.identity_matrix implement 1.  - MatrixSpace.zero_matrix implement 3. Of

[sage-devel] Re: Trac #8276: The one of MatrixSpace can be changed !

2010-02-15 Thread Jason Grout
On 02/15/2010 03:19 PM, Florent Hivert wrote: Hi there, I have a slightly stupid question ! First of all consider the following behavior (sage 4.3.2): sage: A = MatrixSpace(ZZ, 3) sage: A.one() [1 0 0] [0 1 0] [0 0 1] sage: A.one()[1,2] = 1 sage: A.one() [1 0 0] [0 1 1] [0 0 1] This is

Re: [sage-devel] Re: Trac #8276: The one of MatrixSpace can be changed !

2010-02-15 Thread Nick Alexander
To have an idea of the usage I went trough the code: - MatrixSpace.identity_matrix implement 1. - MatrixSpace.zero_matrix implement 3. Of course, my opinion is to make those three methods implements 2. :-) +1 for doing option (2). I very often want to start with the zero_matrix or the

Re: [sage-devel] Re: Trac #8276: The one of MatrixSpace can be changed !

2010-02-15 Thread William Stein
On Mon, Feb 15, 2010 at 9:07 PM, Nick Alexander ncalexan...@gmail.com wrote: To have an idea of the usage I went trough the code:  - MatrixSpace.identity_matrix implement 1.  - MatrixSpace.zero_matrix implement 3. Of course, my opinion is to make those three methods implements 2. :-) +1