|
From: Bill B. <wb...@gm...> - 2006-02-10 01:09:54
|
For what it's worth, matlab's rank function just calls svd, and returns the number singular values greater than a tolerance. The implementation is a whopping 5 lines long. On 2/10/06, Fernando Perez <Fer...@co...> wrote: > > Since numpy is a n-dimensional array package, it may be convenient to > introduce a matrix_rank() routine which does what matlab's rank() for 2-d > arrays and matrices, while raising an error for any other shape. This > would > also make it explicit that this operation is only well-defined for 2-d > objects. Or put it in numpy.linalg, which also makes it pretty clear what the scope is. --bb |