15.12.2012 Views

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

scipy tutorial - Baustatik-Info-Server

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Examples<br />

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

Cutoff for ‘small’ singular values. Singular values smaller than<br />

rcond*largest_singular_value are considered zero.<br />

If None or -1, suitable machine precision is used.<br />

Returns<br />

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

Raises LinAlgError if SVD computation does not converge :<br />

>>> from numpy import *<br />

>>> a = random.randn(9, 6)<br />

>>> B = linalg.pinv2(a)<br />

>>> allclose(a, dot(a, dot(B, a)))<br />

True<br />

>>> allclose(B, dot(B, dot(a, B)))<br />

True<br />

kron(a, b)<br />

Kronecker product of a and b.<br />

The result is the block matrix:<br />

a[0,0]*b a[0,1]*b ... a[0,-1]*b<br />

a[1,0]*b a[1,1]*b ... a[1,-1]*b<br />

...<br />

a[-1,0]*b a[-1,1]*b ... a[-1,-1]*b<br />

Examples<br />

Parameters<br />

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

b : array, shape (P, Q)<br />

Returns<br />

A : array, shape (M*P, N*Q)<br />

Kronecker product of a and b<br />

>>> from <strong>scipy</strong> import kron, array<br />

>>> kron(array([[1,2],[3,4]]), array([[1,1,1]]))<br />

array([[1, 1, 1, 2, 2, 2],<br />

[3, 3, 3, 4, 4, 4]])<br />

hankel(c, r=None)<br />

Construct a Hankel matrix.<br />

The Hankel matrix has constant anti-diagonals, c as its first column, and r as its last row (if not given, r == 0 os<br />

assumed).<br />

Parameters<br />

c : array<br />

r : array<br />

First column of the matrix<br />

Last row of the matrix. If None, r == 0 is assumed.<br />

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

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

Saved successfully!

Ooh no, something went wrong!