in his script. Instead, he can just `from mjo.all import *`.
"""
-from cone.cone import *
-from cone.completely_positive import *
-from cone.doubly_nonnegative import *
-from cone.permutation_invariant import *
-from cone.rearrangement import *
-from cone.symmetric_psd import *
-from interpolation import *
-from misc import *
-from orthogonal_polynomials import *
-from plot import *
-from symbol_sequence import *
-from symbolic 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.orthogonal_polynomials import *
+from mjo.plot import *
+from mjo.symbol_sequence import *
+from mjo.symbolic import *
--- /dev/null
+"""
+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.permutation_invariant import *
+from mjo.cone.rearrangement import *
+from mjo.cone.symmetric_psd 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 sage.all import *
def is_lyapunov_like(L,K):
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.symbolic"
-# resolves.
-from os.path import abspath
-from site import addsitedir
-addsitedir(abspath('../../'))
-
-
def is_symmetric_psd(A):
"""
Determine whether or not the matrix ``A`` is symmetric
With the default 'complex' domain, we don't simplify this::
- sage: (abs(x)^2).simplify()
- abs(x)^2
+ sage: sqrt(x^2).simplify()
+ sqrt(x^2)
But in the 'real' domain, we do::
sage: set_simplification_domain('real')
'real'
- sage: (abs(x)^2).simplify()
- x^2
+ sage: sqrt(x^2).simplify()
+ abs(x)
sage: set_simplification_domain('complex')
'complex'