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
# Use the one the user gave us.
rank_A = rank
- # Begin with the zero matrix, and add projectors to it if we have
- # any.
- A = V.zero_element().column()*V.zero_element().row()
+ # Begin with the zero matrix, and add projectors to it if we have any.
+ A = V.zero().column()*V.zero().row()
# Careful, begin at idx=1 so that we only generate a projector
# when rank_A is greater than zero.