{ } Raw JSON

bundles / scipy 1.17.1 / scipy / sparse / linalg / _matfuncs / expm

function

scipy.sparse.linalg._matfuncs:expm

source: /scipy/sparse/linalg/_matfuncs.py :546

Signature

def   expm ( A )

Summary

Compute the matrix exponential using Pade approximation.

Parameters

A : (M,M) array_like or sparse array

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

Returns

expA : (M,M) ndarray

Matrix exponential of A

Notes

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

Examples

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()
Aexp = expm(A)
Aexp
Aexp.toarray()

Aliases

  • scipy.sparse.linalg.expm

Referenced by

This package