Example #1
0
def test_powm():
    numpy_array = numpy.array([[2, 1, 0], [1, 2, 0], [0, 0, 3]])
    if (CovMat(numpy_array).powm(5) - CovMat(powm(numpy_array, 5))).norm() < 1e-10:
        print("powm: PASS")
        return True
    else:
        print("powm: FAIL")
        return False
Example #2
0
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)
Example #3
0
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)
Example #4
0
def test_powm():
    numpy_array = numpy.array([[2, 1, 0], [1, 2, 0], [0, 0, 3]])
    if (CovMat(numpy_array).powm(5) -
            CovMat(powm(numpy_array, 5))).norm() < 1e-10:
        print("powm: PASS")
        return True
    else:
        print("powm: FAIL")
        return False