Every completely positive matrix is symmetric
positive-semidefinite::
+ sage: set_random_seed()
sage: v = vector(map(abs, random_vector(ZZ, 10)))
sage: A = v.column() * v.row()
sage: is_symmetric_psd(A)
Well, it doesn't crash at least::
+ sage: set_random_seed()
sage: V = VectorSpace(QQ, 2)
sage: A = random_symmetric_psd(V)
sage: A.matrix_space()
A matrix with the desired rank is returned::
+ sage: set_random_seed()
sage: V = VectorSpace(QQ, 5)
sage: A = random_symmetric_psd(V,False,1)
sage: A.rank()
If the user asks for a rank that's too high, we fail::
+ sage: set_random_seed()
sage: V = VectorSpace(QQ, 2)
sage: A = random_symmetric_psd(V,False,3)
Traceback (most recent call last):