X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=mjo%2Fcone%2Fdoubly_nonnegative.py;h=a30a827d158f3b99d7d9df5d295096e7cc349e0f;hb=93cab80b7a220a16a906be8442ba795d8146df14;hp=92184d15c4133e33f04e877352787378ae3739df;hpb=37f72edc947102d41a23c96ff01a51483185a21b;p=sage.d.git diff --git a/mjo/cone/doubly_nonnegative.py b/mjo/cone/doubly_nonnegative.py index 92184d1..a30a827 100644 --- a/mjo/cone/doubly_nonnegative.py +++ b/mjo/cone/doubly_nonnegative.py @@ -13,7 +13,9 @@ It is represented typically by either `\mathcal{D}^{n}` or from sage.all import * -from mjo.cone.symmetric_psd import factor_psd, is_symmetric_psd, random_psd +from mjo.cone.symmetric_psd import (factor_psd, + is_symmetric_psd, + random_symmetric_psd) from mjo.matrix_vector import isomorphism @@ -458,10 +460,10 @@ def random_doubly_nonnegative(V, accept_zero=True, rank=None): # Generate random symmetric positive-semidefinite matrices until # one of them is nonnegative, then return that. - A = random_psd(V, accept_zero, rank) + A = random_symmetric_psd(V, accept_zero, rank) while not all( x >= 0 for x in A.list() ): - A = random_psd(V, accept_zero, rank) + A = random_symmetric_psd(V, accept_zero, rank) return A