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

File trac-11553-matrix-morphisms-additions-review.patch, 1.7 KB (added by mraum, 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 1a0675c2708d227e37bda8133a620918d929afd6
    # Parent  a86f44a98597f061dea4a5e57febb93bf4c7c6ab
    11553: Update some documentation and make all called to matrix() accessed to _matrix.
    
    diff -r a86f44a98597 -r 1a0675c2708d sage/modules/matrix_morphism.py
    a b  
    571571                            cr=True, check=False)
    572572
    573573    def trace(self):
    574         """
     574        r"""
     575        Return the trace of this endomorphism.
     576       
    575577        EXAMPLES::
    576578
    577579            sage: V = ZZ^2; phi = V.hom([V.0+V.1, 2*V.1])
    578580            sage: phi.trace()
    579581            3
    580582        """
    581         return self.matrix().trace()
     583        return self._matrix.trace()
    582584
    583585    def det(self):
    584586        """
     
    718720
    719721    def nullity(self):
    720722        r"""
    721         Returns the nullity of the matrix representing this morphism.
     723        Returns the nullity of the matrix representing this morphism, which is the
     724        dimension of its kernel.
    722725
    723726        EXAMPLES::
    724727
     
    729732            sage: phi.nullity()
    730733            1
    731734        """
    732         return self.matrix().left_nullity()
     735        return self._matrix.left_nullity()
    733736
    734737    def is_injective(self):
    735738        r"""
     
    962965        """
    963966        # any nonzero entry in any matrix representation
    964967        #   disqualifies the morphism as having totally zero outputs
    965         return self.matrix().is_zero()
     968        return self._matrix.is_zero()
    966969
    967970    def is_equal_function(self, other):
    968971        r"""