def sqrtm(M):
    r = real_if_close(expm2(0.5 * logm(M)), 1e-8)
    return (r + r.T) / 2
Returns the symmetric semi-definite positive square root of a matrix.
dataset/ETHPy150Open pybrain/pybrain/pybrain/tools/functions.py/sqrtm