]> gitweb.michael.orlitzky.com - sage.d.git/commitdiff
Convert "n" to an integer explicitly in has_admissible_extreme_rank().
authorMichael Orlitzky <michael@orlitzky.com>
Mon, 3 Nov 2014 03:03:08 +0000 (22:03 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Mon, 3 Nov 2014 03:03:08 +0000 (22:03 -0500)
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.