Ticket #3376: m4ri_20080620.patch

File m4ri_20080620.patch, 1.3 kB (added by malb, 5 months ago)
  • a/sage/matrix/matrix_mod2_dense.pyx

    old new  
    976976            [0 0 0] 
    977977        """ 
    978978        if (int(multiple)%2) != 0: 
    979             mzd_row_add_offset(self._entries, row_from, row_to, start_col) 
     979            mzd_row_add_offset(self._entries, row_to, row_from, start_col) 
    980980     
    981981    cdef swap_rows_c(self, Py_ssize_t row1, Py_ssize_t row2): 
    982982        """ 
     
    10051005            [1 0 0] 
    10061006            [1 0 1] 
    10071007            [0 0 0] 
     1008 
     1009            sage: A = random_matrix(GF(2),3,65) 
     1010 
     1011            sage: B = A.copy() 
     1012            sage: B.swap_columns(0,1) 
     1013            sage: B.swap_columns(0,1) 
     1014            sage: A == B 
     1015            True 
     1016 
     1017            sage: A.swap_columns(0,64) 
     1018            sage: A.column(0) == B.column(64) 
     1019            True 
     1020            sage: A.swap_columns(63,64) 
     1021            sage: A.column(63) == B.column(0) 
     1022            True 
    10081023        """ 
    10091024        mzd_col_swap(self._entries, col1, col2) 
    10101025     
     1026 
     1027 
    10111028    def _magma_init_(self): 
    10121029        r""" 
    10131030        Returns a string of self in \Magma form. Does not return \Magma