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.
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.