15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

See Also:<br />

svd<br />

Returns<br />

Q : array, shape (M, K)<br />

SciPy Reference Guide, Release 0.8.dev<br />

Orthonormal basis for the range of A. K = effective rank of A, as determined by<br />

automatic cutoff<br />

Singular value decomposition of a matrix<br />

cholesky(a, lower=0, overwrite_a=0)<br />

Compute the Cholesky decomposition of a matrix.<br />

Returns the Cholesky decomposition, :lm:‘A = L L^*‘ or :lm:‘A = U^* U‘ of a Hermitian positive-definite<br />

matrix :lm:‘A‘.<br />

Examples<br />

Parameters<br />

a : array, shape (M, M)<br />

Matrix to be decomposed<br />

lower : boolean<br />

Whether to compute the upper or lower triangular Cholesky factorization (Default:<br />

upper-triangular)<br />

overwrite_a : boolean<br />

Whether to overwrite data in a (may improve performance)<br />

Returns<br />

B : array, shape (M, M)<br />

Upper- or lower-triangular Cholesky factor of A<br />

Raises LinAlgError if decomposition fails :<br />

>>> from <strong>scipy</strong> import array, linalg, dot<br />

>>> a = array([[1,-2j],[2j,5]])<br />

>>> L = linalg.cholesky(a, lower=True)<br />

>>> L<br />

array([[ 1.+0.j, 0.+0.j],<br />

[ 0.+2.j, 1.+0.j]])<br />

>>> dot(L, L.T.conj())<br />

array([[ 1.+0.j, 0.-2.j],<br />

[ 0.+2.j, 5.+0.j]])<br />

cholesky_banded(ab, overwrite_ab=0, lower=0)<br />

Cholesky decompose a banded Hermitian positive-definite matrix<br />

The matrix a is stored in ab either in lower diagonal or upper diagonal ordered form:<br />

ab[u + i - j, j] == a[i,j] (if upper form; i = j)<br />

Example of ab (shape of a is (6,6), u=2):<br />

upper form:<br />

* * a02 a13 a24 a35<br />

* a01 a12 a23 a34 a45<br />

3.7. Linear algebra (<strong>scipy</strong>.linalg) 237

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!