Ticket #10791: trac_10791-gram-schmidt-doctests.patch

File trac_10791-gram-schmidt-doctests.patch, 2.1 KB (added by rbeezer, 10 years ago)
  • sage/matrix/matrix2.pyx

    # HG changeset patch
    # User Rob Beezer <beezer@ups.edu>
    # Date 1301203798 25200
    # Node ID 5d01988f9583105f427d87ad1883dfea3a77135a
    # Parent  e1e4e5f6b5a93486408ce74e6d7339c2237e5740
    10791: doctest edits for Gram-Schmidt routines
    diff -r e1e4e5f6b5a9 -r 5d01988f9583 sage/matrix/matrix2.pyx
    a b  
    63616361        to arrive at an orthonormal set, it must be possible to construct
    63626362        square roots of the elements of the base field.  In Sage, your
    63636363        best option is the field of algebraic numbers, ``QQbar``, which
    6364         properly contain the rationals and number fields.
     6364        properly contains the rationals and number fields.
    63666366        If you have an approximate numerical matrix, then this routine
    63676367        requires that your base field be the real and complex
    64426442        To scale a vector to unit length requires taking
    64436443        a square root, which often takes us outside the base ring.
    6444         For the integers,  and rationals the field of algebraic numbers,
    6445         ``QQbar``, is big enough to contain what we need, but the price
     6444        For the integers and the rationals, the field of algebraic numbers
     6445        (``QQbar``) is big enough to contain what we need, but the price
    64466446        is that the computations are very slow, hence mostly of value
    64476447        for small cases or instruction. Now we need to use the
    64486448        ``orthonormal`` keyword.  ::
  • sage/modules/misc.py

    diff -r e1e4e5f6b5a9 -r 5d01988f9583 sage/modules/misc.py
    a b  
    6464        sage: from sage.modules.misc import gram_schmidt
    6565        sage: V = [vector(ZZ,[1,1]), vector(ZZ,[2,2]), vector(ZZ,[1,2])]
    6666        sage: gram_schmidt(V)
     67        Traceback (most recent call last):
     68        ...
     69        ValueError: linearly dependent input for module version of Gram-Schmidt
    6770    """
    6871    import sage.modules.free_module_element
    6972    if len(B) == 0 or len(B[0]) == 0: