Ticket #9425: trac_9425_kernel_on.patch

File trac_9425_kernel_on.patch, 1.4 KB (added by GeorgSWeber, 11 years ago)

created against the older Sage-4.4.2, but that shouldn't matter

  • sage/matrix/matrix2.pyx

    # HG changeset patch
    # User Georg S. Weber <GeorgSWeberYouKnowWhatGooglemailYouKnowTheRest>
    # Date 1278279618 -7200
    # Node ID 39b9ce152ad0ed95ff3fc18b2e03b9e89f3df97d
    # Parent  718d8dde7ea71417692dc32a7afeb8b1d057c839
    fix for trac ticket #9425
    
    diff -r 718d8dde7ea7 -r 39b9ce152ad0 sage/matrix/matrix2.pyx
    a b  
    26512651            [   1 -2/7    0 -2/7]
    26522652            sage: ker.0 * k
    26532653            (0, 0, 0, 0)
     2654
     2655        Test that trac ticket #9425 is fixed.
     2656       
     2657        ::
     2658       
     2659            sage: V = span([[1/7,0,0] ,[0,1,0]], ZZ); V
     2660            Free module of degree 3 and rank 2 over Integer Ring
     2661            Echelon basis matrix:
     2662            [1/7   0   0]
     2663            [  0   1   0]
     2664            sage: T = matrix(ZZ,3,[1,0,0,0,0,0,0,0,0]); T
     2665            [1 0 0]
     2666            [0 0 0]
     2667            [0 0 0]
     2668            sage: W = T.kernel_on(V); W.basis()
     2669            [
     2670            (0, 1, 0)
     2671            ]
     2672            sage: W.is_submodule(V)
     2673            True
    26542674        """
    26552675        A = self.restrict(V, check=check)
    26562676        if not poly is None:
     
    26622682            A = V.basis_matrix()
    26632683            B = W.basis_matrix()
    26642684            C = B*A
    2665             return C.row_module()
     2685            return C.row_module(base_ring=V.base_ring())
    26662686
    26672687
    26682688    def integer_kernel(self, ring=ZZ):