On Tue, 5 Feb 2008 11:37:12 -0800 (PST)
mark <[EMAIL PROTECTED]> 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 in
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,
Thanks again, Mark
On Feb 5, 7:59 pm, "Ni
On Feb 5, 2008 10:54 AM, mark <[EMAIL PROTECTED]> wrote:
> Is there a function to compute the matrix rank of a numpy array or
> matrix?
I'm sure there's a more direct way, but numpy.linalg.lstsq returns the
rank of a matrix.
___
Numpy-discussion mailing
On Tue, 5 Feb 2008 10:54:01 -0800 (PST)
mark <[EMAIL PROTECTED]> wrote:
> Hello -
>
> Is there a function to compute the matrix rank of a
>numpy array or
> matrix?
> So I don't mean the current rank(), which gives the
>number of
> dimensions.
> I mean the number of independent equations of a m
Hello -
Is there a function to compute the matrix rank of a numpy array or
matrix?
So I don't mean the current rank(), which gives the number of
dimensions.
I mean the number of independent equations of a matrix.
Thanks,
Mark
___
Numpy-discussion maili