From: Michael Orlitzky Date: Mon, 3 Nov 2014 03:03:08 +0000 (-0500) Subject: Convert "n" to an integer explicitly in has_admissible_extreme_rank(). X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=f32328c79ac937b3cbbbbfa92e93741f0d373261;p=sage.d.git Convert "n" to an integer explicitly in has_admissible_extreme_rank(). --- diff --git a/mjo/cone/doubly_nonnegative.py b/mjo/cone/doubly_nonnegative.py index b43c974..89bacb9 100644 --- a/mjo/cone/doubly_nonnegative.py +++ b/mjo/cone/doubly_nonnegative.py @@ -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.