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

index ac5f14435713b4b524c53a2e1c73607ee004b323..533c509012f6e0fd2e70ac0b989d22d09f34ffb0 100644 (file)
@@ -5,6 +5,8 @@ the set of all matrices `$A$`of the form `$\sum uu^{T}$` for `$u \in
 `$X$` are nonnegative.
 """
 
+from sage.all import *
+
 # Sage doesn't load ~/.sage/init.sage during testing (sage -t), so we
 # have to explicitly mangle our sitedir here so that "mjo.cone"
 # resolves.
@@ -30,6 +32,10 @@ def is_completely_positive(A):
     Either ``True`` if ``A`` is completely positive, or ``False``
     otherwise.
 
+    SETUP::
+
+        sage: from mjo.cone.completely_positive import is_completely_positive
+
     EXAMPLES:
 
     Generate an extreme completely positive matrix and check that we
@@ -124,6 +130,10 @@ def is_extreme_completely_positive(A):
     1. Berman, Abraham and Shaked-Monderer, Naomi. Completely Positive
        Matrices. World Scientific, 2003.
 
+    SETUP::
+
+        sage: from mjo.cone.completely_positive import is_extreme_completely_positive
+
     EXAMPLES:
 
     Generate an extreme completely positive matrix and check that we