At some point in the past, mangling the sitedir made the test suite
work. Now it doesn't, and we have to do something else. So clean up
the sitedir stuff.
in his script. Instead, he can just `from mjo.all import *`.
"""
in his script. Instead, he can just `from mjo.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.foo"
-# resolves.
-from os.path import abspath
-from site import addsitedir
-addsitedir(abspath('../'))
-
from mjo.cone.all import *
from mjo.interpolation import *
from mjo.misc import *
from mjo.cone.all import *
from mjo.interpolation import *
from mjo.misc import *
All imports from mjo.cone modules.
"""
All imports from mjo.cone modules.
"""
-# Sage doesn't load ~/.sage/init.sage during testing (sage -t), so we
-# have to explicitly mangle our sitedir here so that "mjo.foo" resolves.
-from os.path import abspath
-from site import addsitedir
-addsitedir(abspath('../../'))
-
from mjo.cone.cone import *
from mjo.cone.completely_positive import *
from mjo.cone.doubly_nonnegative import *
from mjo.cone.cone import *
from mjo.cone.completely_positive import *
from mjo.cone.doubly_nonnegative import *
"""
from sage.all import *
"""
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.
-from os.path import abspath
-from site import addsitedir
-addsitedir(abspath('../../'))
from mjo.cone.symmetric_psd import factor_psd, is_symmetric_psd
from mjo.cone.symmetric_psd import factor_psd, is_symmetric_psd
-from mjo.cone.doubly_nonnegative import is_doubly_nonnegative, is_extreme_doubly_nonnegative
+from mjo.cone.doubly_nonnegative import (is_doubly_nonnegative,
+ is_extreme_doubly_nonnegative)
def is_completely_positive(A):
"""
def is_completely_positive(A):
"""
-# Sage doesn't load ~/.sage/init.sage during testing (sage -t), so we
-# have to explicitly mangle our sitedir here so that our module names
-# resolve.
-from os.path import abspath
-from site import addsitedir
-addsitedir(abspath('../../'))
from mjo.cone.symmetric_psd import factor_psd, is_symmetric_psd, random_psd
from mjo.matrix_vector import isomorphism
from mjo.cone.symmetric_psd import factor_psd, is_symmetric_psd, random_psd
from mjo.matrix_vector import isomorphism
-# 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.
-from os.path import abspath
-from site import addsitedir
-addsitedir(abspath('../../'))
-
from sage.all import *
def random_permutation_invariant_cone(lattice=None,
from sage.all import *
def random_permutation_invariant_cone(lattice=None,