Ticket #5715: 5715-subdivisions.patch

File 5715-subdivisions.patch, 1.2 KB (added by jhpalmieri, 11 years ago)
  • sage/matrix/matrix_mod2_dense.pyx

    # HG changeset patch
    # User John H. Palmieri <palmieri@math.washington.edu>
    # Date 1239220683 25200
    # Node ID 3d8f9537662c221b6d75976a29624a96b436e85e
    # Parent  37dc3030a6b0298ae0696a76f95405a3a37238e8
    print subdivisions for matrices over GF(2)
    
    diff -r 37dc3030a6b0 -r 3d8f9537662c sage/matrix/matrix_mod2_dense.pyx
    a b  
    409409            return self._zero
    410410
    411411
    412     def str(self):
    413         """
    414         EXAMPLE:
    415             sage: B = random_matrix(GF(2),3,3)       
    416             sage: B # indirect doctest
    417             [0 1 0]
    418             [0 1 1]
    419             [0 0 0]
    420         """
    421         if self._nrows ==0 or self._ncols == 0:
    422             return "[]"
    423         cdef int i,j
    424         s = []
    425         for i from 0 <= i < self._nrows:
    426             rl = []
    427             for j from 0 <= j < self._ncols:
    428                 rl.append(str(mzd_read_bit(self._entries,i,j)))
    429             s.append( " ".join(rl) )
    430         return "[" + "]\n[".join(s) + "]"
    431 
    432412    ########################################################################
    433413    # LEVEL 2 functionality
    434414    #   * def _pickle