]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
mjo/cone/symmetric_psd.py: fix tests with PYTHONPATH="."
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 1 Nov 2018 19:53:07 +0000 (15:53 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 1 Nov 2018 19:53:07 +0000 (15:53 -0400)
mjo/cone/symmetric_psd.py

index e4be629447987bca42a6d3e795f1b9926bc378c8..ef5d477ce67aa4f40a3466c48904888ddfaa840b 100644 (file)
@@ -20,6 +20,10 @@ def is_symmetric_psd(A):
     Either ``True`` if ``A`` is symmetric positive-semidefinite, or
     ``False`` otherwise.
 
+    SETUP::
+
+        sage: from mjo.cone.symmetric_psd import is_symmetric_psd
+
     EXAMPLES:
 
     Every completely positive matrix is symmetric
@@ -72,6 +76,10 @@ def unit_eigenvectors(A):
     A list of (eigenvalue, eigenvector) pairs where each eigenvector is
     associated with its paired eigenvalue of ``A`` and has norm `1`.
 
+    SETUP::
+
+        sage: from mjo.cone.symmetric_psd import unit_eigenvectors
+
     EXAMPLES::
 
         sage: A = matrix(QQ, [[0, 2, 3], [2, 0, 0], [3, 0, 0]])
@@ -137,6 +145,10 @@ def factor_psd(A):
     `$D$` will have dimension `$k \times k$`. In the end everything
     works out the same.
 
+    SETUP::
+
+        sage: from mjo.cone.symmetric_psd import factor_psd
+
     EXAMPLES:
 
     Create a symmetric positive-semidefinite matrix over the symbolic
@@ -233,6 +245,10 @@ def random_psd(V, accept_zero=True, rank=None):
     ``accept_zero`` is ``False``, we restart the process from the
     beginning.
 
+    SETUP::
+
+        sage: from mjo.cone.symmetric_psd import is_symmetric_psd, random_psd
+
     EXAMPLES:
 
     Well, it doesn't crash at least::