scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
expm(A)

Notes

This is algorithm (6.1) which is a simplification of algorithm (5.1).

versionadded

Parameters

A : (M,M) array_like or sparse matrix

2D Array or Matrix (sparse or dense) to be exponentiated

Returns

expA : (M,M) ndarray

Matrix exponential of A

Compute the matrix exponential using Pade approximation.

Examples

>>> from scipy.sparse import csc_matrix
... from scipy.sparse.linalg import expm
... A = csc_matrix([[1, 0, 0], [0, 2, 0], [0, 0, 3]])
... A.toarray() array([[1, 0, 0], [0, 2, 0], [0, 0, 3]], dtype=int64)
>>> Aexp = expm(A)
... Aexp <3x3 sparse matrix of type '<class 'numpy.float64'>' with 3 stored elements in Compressed Sparse Column format>
>>> Aexp.toarray()
array([[  2.71828183,   0.        ,   0.        ],
       [  0.        ,   7.3890561 ,   0.        ],
       [  0.        ,   0.        ,  20.08553692]])
See :

Back References

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

scipy.sparse.linalg._matfuncs.expm scipy.sparse.linalg._expm_multiply.expm_multiply

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/sparse/linalg/_matfuncs.py#545
type: <class 'function'>
Commit: