scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
logm(A, disp=True)

The matrix logarithm is the inverse of expm: expm(logm(A)) == A

Parameters

A : (N, N) array_like

Matrix whose logarithm to evaluate

disp : bool, optional

Print warning if error in the result is estimated large instead of returning estimated error. (Default: True)

Returns

logm : (N, N) ndarray

Matrix logarithm of A

errest : float

(if disp == False)

1-norm of the estimated error, ||err||_1 / ||A||_1

Compute matrix logarithm.

Examples

>>> from scipy.linalg import logm, expm
... a = np.array([[1.0, 3.0], [1.0, 4.0]])
... b = logm(a)
... b array([[-1.02571087, 2.05142174], [ 0.68380725, 1.02571087]])
>>> expm(b)         # Verify expm(logm(a)) returns a
array([[ 1.,  3.],
       [ 1.,  4.]])
See :

Back References

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

scipy.linalg._matfuncs.logm scipy.linalg._matfuncs_sqrtm._sqrtm_triu

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