scipy.sparse.linalg.
expm#
- scipy.sparse.linalg.expm(A)[Quelle]#
Berechnet die Matrixexponentialfunktion mithilfe der Pade-Approximation.
- Parameter:
- A(M,M) array_like oder Sparse-Array
2D-Array oder Matrix (sparse oder dicht), die exponentiert werden soll
- Rückgabe:
- expA(M,M) ndarray
Matrixexponentialfunktion von A
Hinweise
Dies ist Algorithmus (6.1), eine Vereinfachung von Algorithmus (5.1).
Hinzugefügt in Version 0.12.0.
Referenzen
[1]Awad H. Al-Mohy und Nicholas J. Higham (2009) „A New Scaling and Squaring Algorithm for the Matrix Exponential.“ SIAM Journal on Matrix Analysis and Applications. 31 (3). S. 970-989. ISSN 1095-7162
Beispiele
>>> from scipy.sparse import csc_array >>> from scipy.sparse.linalg import expm >>> A = csc_array([[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 <Compressed Sparse Column sparse array of dtype 'float64' with 3 stored elements and shape (3, 3)> >>> Aexp.toarray() array([[ 2.71828183, 0. , 0. ], [ 0. , 7.3890561 , 0. ], [ 0. , 0. , 20.08553692]])