]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/cone/doubly_nonnegative.py
Convert "n" to an integer explicitly in has_admissible_extreme_rank().
[sage.d.git] / mjo / cone / doubly_nonnegative.py
index b43c974b2076a5dbda14ba43f679fd8caee30327..89bacb9ffff8ede8a76643e219a86da92d6ffa64 100644 (file)
@@ -99,10 +99,12 @@ def has_admissible_extreme_rank(A):
 
     """
     if not A.is_symmetric():
+        # This function is more or less internal, so blow up if passed
+        # something unexpected.
         raise ValueError('The matrix ``A`` must be symmetric.')
 
     r = rank(A)
-    n = A.nrows() # Columns would work, too, since ``A`` is symmetric.
+    n = ZZ(A.nrows()) # Columns would work, too, since ``A`` is symmetric.
 
     if r == 0:
         # Zero is in the doubly-nonnegative cone.