]> gitweb.michael.orlitzky.com - sage.d.git/blobdiff - mjo/cone/doubly_nonnegative.py
mjo/cone/doubly_nonnegative.py: don't check rank validity of None.
[sage.d.git] / mjo / cone / doubly_nonnegative.py
index 9dcae61856e6e9d5bda7f689cadf905de27290ac..1fb350cb46559a55b982ee3de15678e02d5a04de 100644 (file)
@@ -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()))