From: Michael Orlitzky Date: Thu, 1 Nov 2018 19:32:44 +0000 (-0400) Subject: mjo/cone/completely_positive.py: fix tests to work with PYTHONPATH="." X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=53179d0578a8a72bb606182d54871f623f3281cd;p=sage.d.git mjo/cone/completely_positive.py: fix tests to work with PYTHONPATH="." --- diff --git a/mjo/cone/completely_positive.py b/mjo/cone/completely_positive.py index ac5f144..533c509 100644 --- a/mjo/cone/completely_positive.py +++ b/mjo/cone/completely_positive.py @@ -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