bundles / scipy latest / scipy / linalg / _matfuncs / logm
function
scipy.linalg._matfuncs:logm
source: /scipy/linalg/_matfuncs.py :149
Signature
def logm ( A , disp = <object object at 0x0000> ) Summary
Compute matrix logarithm.
Extended Summary
The matrix logarithm is the inverse of expm: expm(logm(A)) == A
The documentation is written assuming array arguments are of specified "core" shapes. However, array argument(s) of this function may have additional "batch" dimensions prepended to the core shape. In this case, the array is treated as a batch of lower-dimensional slices; see linalg_batch for details. Note that calls with zero-size batches are unsupported and will raise a ValueError.
Parameters
A: (N, N) array_likeMatrix whose logarithm to evaluate
disp: bool, optionalEmit warning if error in the result is estimated large instead of returning estimated error. (Default: True)
Returns
logm: (N, N) ndarrayMatrix logarithm of
Aerrest: float(if disp == False)
1-norm of the estimated error, ||err||_1 / ||A||_1
Examples
import numpy as np from scipy.linalg import logm, expm a = np.array([[1.0, 3.0], [1.0, 4.0]]) b = logm(a)✓
b expm(b) # Verify expm(logm(a)) returns a✗
Aliases
-
scipy.linalg.logm