From b760d6ffe2554def684bf1118fff22072b8cf781 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Sat, 7 Dec 2019 18:31:53 -0500 Subject: [PATCH] mjo/cone/doubly_nonnegative.py: don't check rank validity of None. --- mjo/cone/doubly_nonnegative.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mjo/cone/doubly_nonnegative.py b/mjo/cone/doubly_nonnegative.py index 9dcae61..1fb350c 100644 --- a/mjo/cone/doubly_nonnegative.py +++ b/mjo/cone/doubly_nonnegative.py @@ -530,7 +530,7 @@ def random_extreme_doubly_nonnegative(V, accept_zero=True, rank=None): """ - if not is_admissible_extreme_rank(rank, V.dimension()): + if rank is not None and not is_admissible_extreme_rank(rank, V.dimension()): msg = 'Rank %d not possible in dimension %d.' raise ValueError(msg % (rank, V.dimension())) -- 2.44.2