scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersReturnsBackRef
sqrtm(A, disp=True, blocksize=64)

Parameters

A : (N, N) array_like

Matrix whose square root to evaluate

disp : bool, optional

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

blocksize : integer, optional

If the blocksize is not degenerate with respect to the size of the input array, then use a blocked algorithm. (Default: 64)

Returns

sqrtm : (N, N) ndarray

Value of the sqrt function at A

errest : float

(if disp == False)

Frobenius norm of the estimated error, ||err||_F / ||A||_F

Matrix square root.

Examples

>>> from scipy.linalg import sqrtm
... a = np.array([[1.0, 3.0], [1.0, 4.0]])
... r = sqrtm(a)
... r array([[ 0.75592895, 1.13389342], [ 0.37796447, 1.88982237]])
>>> r.dot(r)
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_sqrtm.sqrtm 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_sqrtm.py#117
type: <class 'function'>
Commit: