(参考)行列の平方根の数値計算
https://qiita.com/Kgm1500/items/b3bb1a3246ae4bdfb1ab
(参考)Square root of a matrix
https://en.wikipedia.org/wiki/Square_root_of_a_matrix
fullscript.py
from sympy import *
from mpmath import *
A=Matrix([[5,4,1],
[4,6,4],
[1,4,5]])
print(A)
print(sqrtm(A))
# Matrix([[5, 4, 1], [4, 6, 4], [1, 4, 5]])
# [ 2.0 1.0 3.33606965638267e-20]
# [ 1.0 2.0 1.0]
# [3.34095591577049e-20 1.0 2.0]
2019-01-03
本家stackoverflowでsqrtmを教えてもらった
How to round Matrix sqrtm in sympy?