From 53179d0578a8a72bb606182d54871f623f3281cd Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Thu, 1 Nov 2018 15:32:44 -0400 Subject: [PATCH] mjo/cone/completely_positive.py: fix tests to work with PYTHONPATH="." --- mjo/cone/completely_positive.py | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 -- 2.44.2