In NumPy, I can use random package to create a 2D array, but cannot make sure it has full rank or a particular rank. How to got it? In the case of full rank, I can use linalg.matrix_rank
to check, but I want to make sure this in more simple way. A solution for the case of square matrix is welcome.
Edit: When I ask this question, I think to builtin solution in Numpy. But if there's not that kind of solution in Numpy, Scipy (or other Python modules), the situation here may as in @hpaulj's comment "But at some level this sounds more like a theoretical math topic than a Numpy programming one." And as the math topic, the question should be: find algorithm to generate a random matrix (random in uniform distribution) that has a particular rank? So, closing this question or keeping it to wait nice algorithms in Python is the admin's choice.