Ticket #11553: trac-11553-matrix-morphisms-additions-review-v2.patch

File trac-11553-matrix-morphisms-additions-review-v2.patch, 1.6 KB (added by rbeezer, 10 years ago)
  • sage/modules/matrix_morphism.py

    # HG changeset patch
    # User Martin Raum <Martin.Raum@matha.rwth-aachen.de>
    # Date 1313490979 -7200
    # Node ID 8310cf797aa421c4cd34f3d811c05e8c0e45680a
    # Parent  41494f7e367877818219c73d669c92601cf30599
    11553: Update some documentation and make all called to matrix() accessed to _matrix.
    
    diff --git a/sage/modules/matrix_morphism.py b/sage/modules/matrix_morphism.py
    a b  
    574574                            cr=True, check=False)
    575575
    576576    def trace(self):
    577         """
     577        r"""
     578        Return the trace of this endomorphism.
     579       
    578580        EXAMPLES::
    579581
    580582            sage: V = ZZ^2; phi = V.hom([V.0+V.1, 2*V.1])
    581583            sage: phi.trace()
    582584            3
    583585        """
    584         return self.matrix().trace()
     586        return self._matrix.trace()
    585587
    586588    def det(self):
    587589        """
     
    721723
    722724    def nullity(self):
    723725        r"""
    724         Returns the nullity of the matrix representing this morphism.
     726        Returns the nullity of the matrix representing this morphism, which is the
     727        dimension of its kernel.
    725728
    726729        EXAMPLES::
    727730
     
    732735            sage: phi.nullity()
    733736            1
    734737        """
    735         return self.matrix().left_nullity()
     738        return self._matrix.left_nullity()
    736739
    737740    def is_bijective(self):
    738741        r"""
     
    892895        """
    893896        # any nonzero entry in any matrix representation
    894897        #   disqualifies the morphism as having totally zero outputs
    895         return self.matrix().is_zero()
     898        return self._matrix.is_zero()
    896899
    897900    def is_equal_function(self, other):
    898901        r"""