[sage-devel] Re: Matrix question

2007-06-28 Thread Justin C. Walker
On Jun 28, 2007, at 16:30 , David Roe wrote: > Sorry I didn't reply earlier. Not a problem. > Implementing an is_symmetric function for matrices sounds like a > good idea. > But I think it should go in the base class: something like That was my feeling as well. > def is_symmetric(self): >

[sage-devel] Re: Matrix question

2007-06-28 Thread William Stein
+1 -- I agree 100% with David Roe's response. On 6/28/07, David Roe <[EMAIL PROTECTED]> wrote: > Sorry I didn't reply earlier. > > Implementing an is_symmetric function for matrices sounds like a good idea. > But I think it should go in the base class: something like > > def is_symmetric(self): >

[sage-devel] Re: Matrix question

2007-06-28 Thread David Roe
Sorry I didn't reply earlier. Implementing an is_symmetric function for matrices sounds like a good idea. But I think it should go in the base class: something like def is_symmetric(self): if self.ncols != self.nrows: return False cdef int i, j: for i from 1 <= i < self.nrows: