> On 2010-10-06 02:04, François Bissey wrote:
> >> I would like to see the source code of
> >> sage.matrix.matrix_modn_sparse.Matrix_modn_sparse.__eq__(), but I have
> >> no idea where to look.
> > 
> > sage/matrix/matrix_modn_sparse.pyx ?
> 
> Well, I obviously looked there, but didn't find it.
> 
> More precisely, I am looking for the location of the code which compares
> a Matrix_modn_sparse with a Matrix_modn_dense.  I.e. I want to see the
> code for
> 
> sage: L = matrix(GF(43), 3, 3, range(9), sparse=True)
> sage: R = matrix(GF(43), 3, 3, range(9))
> sage: type(L)
> <type 'sage.matrix.matrix_modn_sparse.Matrix_modn_sparse'>
> sage: type(R)
> <type 'sage.matrix.matrix_modn_dense.Matrix_modn_dense'>
> sage: L==R   # Where is this implemented?
> True
> 
> I also tried the "trace()" command, but that doesn't seem to work well
> with Cython code.
> 
I was thinking that may be it was done by the __richcmp__, line 229-230:
    def __richcmp__(matrix.Matrix self, right, int op):  # always need for 
mysterious reasons.
        return self._richcmp(right, op)

Francois


-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to