[SciPy-dev] band matrix wrapping ready for inclusion
Arnd Baecker
arnd.baecker at web.de
Fri Jun 30 08:25:24 CDT 2006
On Fri, 30 Jun 2006, Nils Wagner wrote:
[...]
> Did you check general band matrices ?
No.
> If you need a test for real nonsymmetric band matrices
Not this time - the wrapped routines are for symmetric or
Hermetian routines only.
> from scipy import linalg, diag, arange, linspace, sort
> def sylvester(n):
> #
> # Sylvester matrix
> #
> tmp = diag(arange(1,n),1)+diag(arange(n-1,0,-1),-1)
> return tmp
>
> n = 9
> A = sylvester(n)
> w1=linalg.eigvals(A)
> w1=sort(w1.real)
> #
> # Exact eigenvalues
> #
> w_ex = linspace(-(n-1),n-1,n,endpoint=True)
> print linalg.norm(w1-w_ex)
>
> Nils
>
> _______________________________________________
> Scipy-dev mailing list
> Scipy-dev at scipy.org
> http://projects.scipy.org/mailman/listinfo/scipy-dev
>
>
More information about the Scipy-dev
mailing list