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 test_expm(): numpy_array = numpy.array([[2, 1, 0], [1, 2, 0], [0, 0, 3]]) if (CovMat(numpy_array).expm - CovMat(expm(numpy_array))).norm() < 1e-10: print("expm: PASS") return True else: print("expm: 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)