Ticket #3704: trac-3704-diagonal_matrix-4.patch

File trac-3704-diagonal_matrix-4.patch, 816 bytes (added by cremona, 13 years ago)
  • sage/matrix/constructor.py

    # HG changeset patch
    # User John Cremona <john.cremona@gmail.com>
    # Date 1220356919 -3600
    # Node ID fe4a520f14fa53be3c1a70de6ef2ffc92656be7e
    # Parent  f74143720ebefa494bdba51a3dcf40db06a6ac6c
    # Added one doctest for #3704
    
    diff -r f74143720ebe -r fe4a520f14fa sage/matrix/constructor.py
    a b  
    702702        [0 0 3]
    703703        sage: a.parent()
    704704        Full MatrixSpace of 3 by 3 sparse matrices over Rational Field
     705
     706        # See trac\#3704:
     707        sage: M = diagonal_matrix(x^3+3, x+1); M
     708        [x^3 + 3       0]
     709        [      0   x + 1]
     710        sage: M.parent()
     711        Full MatrixSpace of 2 by 2 dense matrices over Symbolic Ring
     712
    705713    """
    706714
    707715    args = list(args)