scipy 1.8.0 Pypi GitHub Homepage
Other Docs
BackRef

To remove in the future –– scipy.linalg

Linear algebra (:mod:`scipy.linalg`)

.. currentmodule:: scipy.linalg
    

Linear algebra functions.

            <Comment: 
   |value: '.. eventually, we should replace the numpy.linalg HTML link with just `numpy.linalg`'
   |>
           
.. seealso:: 
    `numpy.linalg <https://www.numpy.org/devdocs/reference/routines.linalg.html>`__
    for more linear algebra functions. Note that
    although `scipy.linalg` imports most of them, identically named
    functions from `scipy.linalg` may offer more or slightly differing
    functionality.

Basics

.. autosummary:: 
    :toctree:generated/
    inv - Find the inverse of a square matrix
    solve - Solve a linear system of equations
    solve_banded - Solve a banded linear system
    solveh_banded - Solve a Hermitian or symmetric banded system
    solve_circulant - Solve a circulant system
    solve_triangular - Solve a triangular matrix
    solve_toeplitz - Solve a toeplitz matrix
    matmul_toeplitz - Multiply a Toeplitz matrix with an array.
    det - Find the determinant of a square matrix
    norm - Matrix and vector norm
    lstsq - Solve a linear least-squares problem
    pinv - Pseudo-inverse (Moore-Penrose) using lstsq
    pinv2 - Pseudo-inverse using svd
    pinvh - Pseudo-inverse of hermitian matrix
    kron - Kronecker product of two arrays
    khatri_rao - Khatri-Rao product of two arrays
    tril - Construct a lower-triangular matrix from a given matrix
    triu - Construct an upper-triangular matrix from a given matrix
    orthogonal_procrustes - Solve an orthogonal Procrustes problem
    matrix_balance - Balance matrix entries with a similarity transformation
    subspace_angles - Compute the subspace angles between two matrices
    bandwidth - Return the lower and upper bandwidth of an array
    issymmetric - Check if a square 2D array is symmetric
    ishermitian - Check if a square 2D array is Hermitian
    LinAlgError
    LinAlgWarning

Eigenvalue Problems

.. autosummary:: 
    :toctree:generated/
    eig - Find the eigenvalues and eigenvectors of a square matrix
    eigvals - Find just the eigenvalues of a square matrix
    eigh - Find the e-vals and e-vectors of a Hermitian or symmetric matrix
    eigvalsh - Find just the eigenvalues of a Hermitian or symmetric matrix
    eig_banded - Find the eigenvalues and eigenvectors of a banded matrix
    eigvals_banded - Find just the eigenvalues of a banded matrix
    eigh_tridiagonal - Find the eigenvalues and eigenvectors of a tridiagonal matrix
    eigvalsh_tridiagonal - Find just the eigenvalues of a tridiagonal matrix

Decompositions

.. autosummary:: 
    :toctree:generated/
    lu - LU decomposition of a matrix
    lu_factor - LU decomposition returning unordered matrix and pivots
    lu_solve - Solve Ax=b using back substitution with output of lu_factor
    svd - Singular value decomposition of a matrix
    svdvals - Singular values of a matrix
    diagsvd - Construct matrix of singular values from output of svd
    orth - Construct orthonormal basis for the range of A using svd
    null_space - Construct orthonormal basis for the null space of A using svd
    ldl - LDL.T decomposition of a Hermitian or a symmetric matrix.
    cholesky - Cholesky decomposition of a matrix
    cholesky_banded - Cholesky decomp. of a sym. or Hermitian banded matrix
    cho_factor - Cholesky decomposition for use in solving a linear system
    cho_solve - Solve previously factored linear system
    cho_solve_banded - Solve previously factored banded linear system
    polar - Compute the polar decomposition.
    qr - QR decomposition of a matrix
    qr_multiply - QR decomposition and multiplication by Q
    qr_update - Rank k QR update
    qr_delete - QR downdate on row or column deletion
    qr_insert - QR update on row or column insertion
    rq - RQ decomposition of a matrix
    qz - QZ decomposition of a pair of matrices
    ordqz - QZ decomposition of a pair of matrices with reordering
    schur - Schur decomposition of a matrix
    rsf2csf - Real to complex Schur form
    hessenberg - Hessenberg form of a matrix
    cdf2rdf - Complex diagonal form to real diagonal block form
    cossin - Cosine sine decomposition of a unitary or orthogonal matrix
.. seealso:: 
    `scipy.linalg.interpolative` -- Interpolative matrix decompositions

Matrix Functions

.. autosummary:: 
    :toctree:generated/
    expm - Matrix exponential
    logm - Matrix logarithm
    cosm - Matrix cosine
    sinm - Matrix sine
    tanm - Matrix tangent
    coshm - Matrix hyperbolic cosine
    sinhm - Matrix hyperbolic sine
    tanhm - Matrix hyperbolic tangent
    signm - Matrix sign
    sqrtm - Matrix square root
    funm - Evaluating an arbitrary matrix function
    expm_frechet - Frechet derivative of the matrix exponential
    expm_cond - Relative condition number of expm in the Frobenius norm
    fractional_matrix_power - Fractional matrix power

Matrix Equation Solvers

.. autosummary:: 
    :toctree:generated/
    solve_sylvester - Solve the Sylvester matrix equation
    solve_continuous_are - Solve the continuous-time algebraic Riccati equation
    solve_discrete_are - Solve the discrete-time algebraic Riccati equation
    solve_continuous_lyapunov - Solve the continuous-time Lyapunov equation
    solve_discrete_lyapunov - Solve the discrete-time Lyapunov equation

Sketches and Random Projections

.. autosummary:: 
    :toctree:generated/
    clarkson_woodruff_transform - Applies the Clarkson Woodruff Sketch (a.k.a CountMin Sketch)

Special Matrices

.. autosummary:: 
    :toctree:generated/
    block_diag - Construct a block diagonal matrix from submatrices
    circulant - Circulant matrix
    companion - Companion matrix
    convolution_matrix - Convolution matrix
    dft - Discrete Fourier transform matrix
    fiedler - Fiedler matrix
    fiedler_companion - Fiedler companion matrix
    hadamard - Hadamard matrix of order 2**n
    hankel - Hankel matrix
    helmert - Helmert matrix
    hilbert - Hilbert matrix
    invhilbert - Inverse Hilbert matrix
    leslie - Leslie matrix
    pascal - Pascal matrix
    invpascal - Inverse Pascal matrix
    toeplitz - Toeplitz matrix
    tri - Construct a matrix filled with ones at and below a given diagonal

Low-level routines

.. autosummary:: 
    :toctree:generated/
    get_blas_funcs
    get_lapack_funcs
    find_best_blas_type
.. seealso:: 
    `scipy.linalg.blas` -- Low-level BLAS functions

    `scipy.linalg.lapack` -- Low-level LAPACK functions

    `scipy.linalg.cython_blas` -- Low-level BLAS functions for Cython

    `scipy.linalg.cython_lapack` -- Low-level LAPACK functions for Cython

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy

93 Elements
scipy.linalg._solvers.solve_continuous_are
scipy.linalg._decomp_update.qr_insert
scipy.linalg._matfuncs_sqrtm.sqrtm
scipy.linalg._special_matrices.helmert
scipy.linalg._decomp_svd.svdvals
scipy.linalg._special_matrices.hadamard
scipy.linalg._expm_frechet.expm_frechet
scipy.linalg._decomp_cholesky.cholesky_banded
scipy.linalg._decomp_cholesky.cho_factor
scipy.linalg._solvers.solve_sylvester
scipy.linalg.blas.get_blas_funcs
scipy.linalg._matfuncs.signm
scipy.linalg._basic.inv
scipy.linalg._special_matrices.pascal
scipy.linalg._special_matrices.tri
scipy.linalg._decomp_update.qr_delete
scipy.linalg._basic.solve_circulant
scipy.linalg._matfuncs.tanm
scipy.linalg._matfuncs.logm
scipy.linalg.blas.find_best_blas_type
scipy.linalg._decomp_svd.subspace_angles
scipy.linalg._matfuncs.fractional_matrix_power
scipy.linalg._special_matrices.dft
scipy.linalg._decomp.eigvals
scipy.linalg._expm_frechet.expm_cond
scipy.linalg._decomp.eig
scipy.linalg._decomp.hessenberg
scipy.linalg._decomp.eigvalsh
scipy.linalg.lapack._compute_lwork
scipy.linalg._matfuncs.sinhm
scipy.linalg._misc.norm
scipy.linalg._decomp_schur.rsf2csf
scipy.linalg._solvers.solve_discrete_lyapunov
scipy.linalg._decomp_svd.null_space
scipy.linalg._basic.solve
scipy.linalg._special_matrices.leslie
scipy.linalg._basic.solve_banded
scipy.linalg._decomp.eigvals_banded
scipy.linalg._special_matrices.tril
scipy.linalg._decomp_update.qr_update
scipy.linalg._decomp_ldl.ldl
scipy.linalg._basic.det
scipy.linalg._decomp_qz.qz
scipy.linalg._solvers.solve_discrete_are
scipy.linalg._decomp.eigh
scipy.linalg._basic.matrix_balance
scipy.linalg._decomp_qr.qr_multiply
scipy.linalg._solvers.solve_continuous_lyapunov
scipy.linalg._basic.solve_toeplitz
scipy.linalg._matfuncs.cosm
scipy.linalg._decomp_qr.qr
scipy.linalg._basic.pinv
scipy.linalg._matfuncs.funm
scipy.linalg._special_matrices.triu
scipy.linalg._matfuncs.coshm
scipy.linalg._matfuncs.khatri_rao
scipy.special._orthogonal.chebyu
scipy.linalg._matfuncs.sinm
scipy.linalg._basic.lstsq
scipy.linalg._special_matrices.companion
scipy.linalg._decomp.eig_banded
scipy.special._orthogonal.chebyt
scipy.linalg._decomp_cholesky.cho_solve_banded
scipy.linalg._procrustes.orthogonal_procrustes
scipy.linalg._basic.solveh_banded
scipy.linalg._matfuncs.expm
scipy.linalg._decomp_cholesky.cho_solve
scipy.linalg._decomp_lu.lu_solve
scipy.linalg._basic.matmul_toeplitz
scipy.linalg._special_matrices.hilbert
scipy.linalg._special_matrices.toeplitz
scipy.linalg._decomp_svd.diagsvd
scipy.linalg._special_matrices.hankel
scipy.linalg._special_matrices.circulant
scipy.linalg._decomp_lu.lu_factor
scipy.linalg._special_matrices.fiedler_companion
scipy.linalg._decomp_svd.svd
scipy.linalg._decomp_lu.lu
scipy.linalg._special_matrices.invhilbert
scipy.linalg._basic.solve_triangular
scipy.linalg._decomp_polar.polar
scipy.linalg.lapack.get_lapack_funcs
scipy.linalg._special_matrices.invpascal
scipy.linalg._decomp_schur.schur
scipy.linalg._decomp_cholesky.cholesky
scipy.linalg._basic.pinvh
scipy.linalg._decomp_qz.ordqz
scipy.linalg._special_matrices.convolution_matrix
scipy.linalg._decomp_svd.orth
scipy.linalg._matfuncs.tanhm
scipy.linalg._special_matrices.kron
scipy.linalg._special_matrices.block_diag
scipy.linalg._decomp_qr.rq

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/linalg/__init__.py#0
type: <class 'module'>
Commit: