# HG changeset patch
# User Rob Beezer
# Date 1301203798 25200
# Node ID 1f2f69aed28b5eac302b6bcf790b3948a4e34b3a
# Parent 9bf40613dbca3acfc33762f3c01774df48f4f9f4
10791: doctest edits for Gram-Schmidt routines
diff -r 9bf40613dbca -r 1f2f69aed28b sage/matrix/matrix2.pyx
--- a/sage/matrix/matrix2.pyx Sat Feb 26 17:27:56 2011 -0800
+++ b/sage/matrix/matrix2.pyx Sat Mar 26 22:29:58 2011 -0700
@@ -6066,7 +6066,7 @@
to arrive at an orthonormal set, it must be possible to construct
square roots of the elements of the base field. In Sage, your
best option is the field of algebraic numbers, ``QQbar``, which
- properly contain the rationals and number fields.
+ properly contains the rationals and number fields.
If you have an approximate numerical matrix, then this routine
requires that your base field be the real and complex
@@ -6075,7 +6075,7 @@
attempt is made to recognize linear dependence with approximate
calculations.
- EXAMPLES::
+ EXAMPLES:
Inexact Rings, Numerical Matrices:
@@ -6146,8 +6146,8 @@
To scale a vector to unit length requires taking
a square root, which often takes us outside the base ring.
- For the integers, and rationals the field of algebraic numbers,
- ``QQbar``, is big enough to contain what we need, but the price
+ For the integers and the rationals, the field of algebraic numbers
+ (``QQbar``) is big enough to contain what we need, but the price
is that the computations are very slow, hence mostly of value
for small cases or instruction. Now we need to use the
``orthonormal`` keyword. ::
@@ -6245,7 +6245,7 @@
Use the ``orthonormal=False`` keyword (or assume it as the default).
Note that now the orthogonality check creates a diagonal matrix
whose diagonal entries are the squares of the lengths of the
- vectors. ::
+ vectors.
First, in the rationals, without involving ``QQbar``. ::
diff -r 9bf40613dbca -r 1f2f69aed28b sage/modules/misc.py
--- a/sage/modules/misc.py Sat Feb 26 17:27:56 2011 -0800
+++ b/sage/modules/misc.py Sat Mar 26 22:29:58 2011 -0700
@@ -64,6 +64,9 @@
sage: from sage.modules.misc import gram_schmidt
sage: V = [vector(ZZ,[1,1]), vector(ZZ,[2,2]), vector(ZZ,[1,2])]
sage: gram_schmidt(V)
+ Traceback (most recent call last):
+ ...
+ ValueError: linearly dependent input for module version of Gram-Schmidt
"""
import sage.modules.free_module_element
if len(B) == 0 or len(B[0]) == 0: