Ticket #4492: 4492_doctest_nonsquare0_block.patch

File 4492_doctest_nonsquare0_block.patch, 914 bytes (added by wjp, 12 years ago)
  • sage/matrix/constructor.py

    # HG changeset patch
    # User Willem Jan Palenstijn <wjp@usecode.org>
    # Date 1263925051 28800
    # Node ID 1f759c7fc319e752cfaccaf72b3708f4adacf474
    # Parent  33c04bb5aea0255c4fac02782a9974deaf33f1ce
    4492: Add extra doctest for non-square zero block
    
    diff -r 33c04bb5aea0 -r 1f759c7fc319 sage/matrix/constructor.py
    a b  
    996996        [-----+-----]
    997997        [ 0  0| 1  0]
    998998        [ 0  0| 0  1]
     999
     1000    A zero entry may represent any square or non-square zero matrix::
     1001
     1002        sage: B = matrix(QQ, 1, 1, [ 1 ] )
     1003        sage: C = matrix(QQ, 2, 2, [ 2, 3, 4, 5 ] )
     1004        sage: block_matrix([B, 0, 0, C])
     1005        [1|0 0]
     1006        [-+---]
     1007        [0|2 3]
     1008        [0|4 5]
    9991009   
    10001010    One can specify the number of rows or columns (optional for square
    10011011    number of matrices)::