]> gitweb.michael.orlitzky.com - dunshire.git/blobdiff - test/matrices_test.py
A bunch more doc fixes.
[dunshire.git] / test / matrices_test.py
index e755f31cf30140c8bb80c6f539ba4bb86deaf41c..69f9da906e16462423d4a922e420046125ffef04 100644 (file)
@@ -1,5 +1,5 @@
 """
-Unit tests for the functions in the ``matrices`` module.
+Unit tests for the functions in the :mod:`dunshire.matrices` module.
 """
 
 from copy import deepcopy
@@ -36,7 +36,7 @@ class AppendColTest(TestCase):
 
 class AppendRowTest(TestCase):
     """
-    Tests for the :func:`append_row` function.
+    Tests for the :func:`dunshire.matrices.append_row` function.
     """
 
     def test_new_dimensions(self):
@@ -58,7 +58,7 @@ class AppendRowTest(TestCase):
 
 class EigenvaluesTest(TestCase):
     """
-    Tests for the :func:`eigenvalues` function.
+    Tests for the :func:`dunshire.matrices.eigenvalues` function.
     """
 
     def test_eigenvalues_input_not_clobbered(self):
@@ -82,8 +82,9 @@ class EigenvaluesTest(TestCase):
     def test_eigenvalues_of_symmat_are_real(self):
         """
         A real symmetric matrix has real eigenvalues, so if we start
-        with a symmetric matrix, then the two functions :func:`eigenvalues`
-        and :func:`eigenvalues_re` should agree on it.
+        with a symmetric matrix, then the two functions
+        :func:`dunshire.matrices.eigenvalues` and
+        :func:`dunshire.matrices.eigenvalues_re` should agree on it.
         """
         mat = random_matrix(random_natural())
         symmat = mat + mat.trans()
@@ -103,20 +104,21 @@ class EigenvaluesTest(TestCase):
 
 class EigenvaluesRealPartTest(TestCase):
     """
-    Tests for the :func:`eigenvalues_re` function.
+    Tests for the :func:`dunshire.matrices.eigenvalues_re` function.
     """
 
     def test_eigenvalues_re_input_not_clobbered(self):
         """
-        The eigenvalue functions provided by CVXOPT/LAPACK like to
-        overwrite the matrices that you pass into them as
-        arguments. This test makes sure that our :func:`eigenvalues_re`
-        function does not do the same.
+        The eigenvalue functions provided by CVXOPT/LAPACK like
+        to overwrite the matrices that you pass into them as
+        arguments. This test makes sure that our
+        :func:`dunshire.matrices.eigenvalues_re` function does not do
+        the same.
 
         We use a ``deepcopy`` here in case the ``copy`` used in the
-        :func:`eigenvalues_re` function is insufficient. If ``copy`` didn't
-        work and this test used it too, then this test would pass when
-        it shouldn't.
+        :func:`dunshire.matrices.eigenvalues_re` function is
+        insufficient. If ``copy`` didn't work and this test used it too,
+        then this test would pass when it shouldn't.
         """
         mat = random_matrix(random_natural())
         mat_copy = deepcopy(mat)
@@ -134,14 +136,15 @@ class EigenvaluesRealPartTest(TestCase):
 
 class InnerProductTest(TestCase):
     """
-    Tests for the :func:`inner_product` function.
+    Tests for the :func:`dunshire.matrices.inner_product` function.
     """
 
     def test_inner_product_with_self_is_norm_squared(self):
         """
-        Ensure that the func:`inner_product` and :func:`norm` functions
-        are compatible by checking that the square of the norm of a
-        vector is its inner product with itself.
+        Ensure that the func:`dunshire.matrices.inner_product` and
+        :func:`dunshire.matrices.norm` functions are compatible by
+        checking that the square of the norm of a vector is its inner
+        product with itself.
         """
         vec = random_matrix(random_natural(), 1)
         actual = inner_product(vec, vec)
@@ -151,7 +154,7 @@ class InnerProductTest(TestCase):
 
 class NormTest(TestCase):
     """
-    Tests for the :func:`norm` function.
+    Tests for the :func:`dunshire.matrices.norm` function.
     """
 
     def test_norm_is_nonnegative(self):
@@ -164,7 +167,7 @@ class NormTest(TestCase):
 
 class ConditionNumberTest(TestCase):
     """
-    Tests for the :func:`condition_number` function.
+    Tests for the :func:`dunshire.matrices.condition_number` function.
     """
 
     def test_condition_number_ge_one(self):