[Numpy-discussion] matrix rank of numpy array or matrix
Nils Wagner
nwagner@iam.uni-stuttgart...
Tue Feb 5 13:48:52 CST 2008
On Tue, 5 Feb 2008 11:37:12 -0800 (PST)
mark <markbak@gmail.com> wrote:
> Thanks.
> I rewrote the line as:
>
> from numpy.linalg import svd
> from numpy import sum,where
>
> def matrixrank(A,tol=1e-8):
> s = svd(A,compute_uv=0)
> return sum( where( s>tol, 1, 0 ) )
>
> Would be nice to include matrixrank in numpy, as it is
>really useful,
+1
And a nullspace function - how about that ?
See
http://aspn.activestate.com/ASPN/Mail/Message/scipy-user/2726126
Nils
More information about the Numpy-discussion
mailing list