From f32328c79ac937b3cbbbbfa92e93741f0d373261 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sun, 2 Nov 2014 22:03:08 -0500 Subject: [PATCH] Convert "n" to an integer explicitly in has_admissible_extreme_rank(). --- mjo/cone/doubly_nonnegative.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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. -- 2.44.2