Linear algebra (scipy.linalg)

Basics

inv (a[, overwrite_a]) Compute the inverse of a matrix.
solve (a, b[, sym_pos, lower, ...]) Solve the equation a x = b for x
solve_banded ((l, u), ab, b[, overwrite_ab, overwrite_b, ...]) Solve the equation a x = b for x, assuming a is banded matrix.
solveh_banded (ab, b[, overwrite_ab, overwrite_b, ...]) Solve equation a x = b. a is Hermitian positive-definite banded matrix.
det (a[, overwrite_a]) Compute the determinant of a matrix
norm (x[, ord]) Matrix or vector norm.
lstsq (a, b[, cond, overwrite_a, ...]) Compute least-squares solution to equation :m:`a x = b`
pinv (a[, cond, rcond]) Compute the (Moore-Penrose) pseudo-inverse of a matrix.
pinv2 (a[, cond, rcond]) Compute the (Moore-Penrose) pseudo-inverse of a matrix.

Eigenvalues and Decompositions

eig (a[, b, left, right, ...]) Solve an ordinary or generalized eigenvalue problem of a square matrix.
eigvals (a[, b, overwrite_a]) Compute eigenvalues from an ordinary or generalized eigenvalue problem.
eigh (a[, b, lower, eigvals_only, ...]) Solve an ordinary or generalized eigenvalue problem for a complex Hermitian or real symmetric matrix.
eigvalsh (a[, b, lower, overwrite_a, ...]) Solve an ordinary or generalized eigenvalue problem for a complex Hermitian or real symmetric matrix.
eig_banded (a_band[, lower, eigvals_only, ...]) Solve real symmetric or complex hermetian band matrix eigenvalue problem.
eigvals_banded (a_band[, lower, overwrite_a_band, ...]) Solve real symmetric or complex hermitian band matrix eigenvalue problem.
lu (a[, permute_l, overwrite_a]) Compute pivoted LU decompostion of a matrix.
lu_factor (a[, overwrite_a]) Compute pivoted LU decomposition of a matrix.
lu_solve ((lu, piv), b[, trans, overwrite_b]) Solve an equation system, a x = b, given the LU factorization of a
svd (a[, full_matrices, compute_uv, ...]) Singular Value Decomposition.
svdvals (a[, overwrite_a]) Compute singular values of a matrix.
diagsvd (s, M, N) Construct the sigma matrix in SVD from singular values and size M,N.
orth (A) Construct an orthonormal basis for the range of A using SVD
cholesky (a[, lower, overwrite_a]) Compute the Cholesky decomposition of a matrix.
cholesky_banded (ab[, overwrite_ab, lower]) Cholesky decompose a banded Hermitian positive-definite matrix
cho_factor (a[, lower, overwrite_a]) Compute the Cholesky decomposition of a matrix, to use in cho_solve
cho_solve (clow, b) Solve a previously factored symmetric system of equations.
qr (a[, overwrite_a, lwork, ...]) Compute QR decomposition of a matrix.
schur (a[, output, lwork, overwrite_a]) Compute Schur decomposition of a matrix.
rsf2csf (T, Z) Convert real Schur form to complex Schur form.
hessenberg (a[, calc_q, overwrite_a]) Compute Hessenberg form of a matrix.

Matrix Functions

expm (A[, q]) Compute the matrix exponential using Pade approximation.
expm2 (A) Compute the matrix exponential using eigenvalue decomposition.
expm3 (A[, q]) Compute the matrix exponential using Taylor series.
logm (A[, disp]) Compute matrix logarithm.
cosm (A) Compute the matrix cosine.
sinm (A) Compute the matrix sine.
tanm (A) Compute the matrix tangent.
coshm (A) Compute the hyperbolic matrix cosine.
sinhm (A) Compute the hyperbolic matrix sine.
tanhm (A) Compute the hyperbolic matrix tangent.
signm (a[, disp]) Matrix sign function.
sqrtm (A[, disp]) Matrix square root.
funm (A, func[, disp]) Evaluate a matrix function specified by a callable.

Iterative linear systems solutions

cg (*args, **kwds) scipy.linalg.cg is DEPRECATED!! – use scipy.sparse.linalg.cg instead
cgs (*args, **kwds) scipy.linalg.cgs is DEPRECATED!! – use scipy.sparse.linalg.cgs instead
qmr (*args, **kwds) scipy.linalg.qmr is DEPRECATED!! – use scipy.sparse.linalg.qmr instead
gmres (*args, **kwds) scipy.linalg.gmres is DEPRECATED!! – use scipy.sparse.linalg.gmres instead
bicg (*args, **kwds) scipy.linalg.bicg is DEPRECATED!! – use scipy.sparse.linalg.bicg instead
bicgstab (*args, **kwds) scipy.linalg.bicgstab is DEPRECATED!! – use scipy.sparse.linalg.bicgstab instead