def test_logm(): numpy_array = numpy.array([[2, 1, 0], [1, 2, 0], [0, 0, 3]]) if (CovMat(numpy_array).logm - CovMat(logm(numpy_array))).norm() < 1e-10: print("logm: PASS") return True else: print("logm: FAIL") return False
def function2(): a = numpy.random.rand(100, 200) covmat = numpy.dot(a, a.T) / 100**2 a = sqrtm(covmat) b = invsqrtm(covmat) c = expm(covmat) d = logm(covmat) e = powm(covmat, 2)
def function2(): a = numpy.random.rand(100, 200) covmat = numpy.dot(a, a.T) / 100 ** 2 a = sqrtm(covmat) b = invsqrtm(covmat) c = expm(covmat) d = logm(covmat) e = powm(covmat, 2)