@staticmethod 
    def svd_from_eigh(A, eps=10**-8, tol=10**-8):
        AA = A.conj().T.dot(A)
        lmbda, Q = scipy.linalg.eigh(AA + eps*numpy.eye(A.shape[1]))
        lmbda = lmbda-eps

        inds = numpy.arange(lmbda.shape[0])[lmbda>tol]
        lmbda, Q = Util.indEig(lmbda, Q, inds)

        sigma = lmbda**0.5
        P = A.dot(Q) / sigma
        Qh = Q.conj().T

        if __debug__:
            if not scipy.allclose(A, (P*sigma).dot(Qh), atol=tol):
                logging.warn(" SVD obtained from EVD is too poor")
            Parameter.checkArray(P, softCheck=True, arrayInfo="P in svd_from_eigh()")
            if not Parameter.checkOrthogonal(P, tol=tol, softCheck=True, arrayInfo="P in svd_from_eigh()", investigate=True):
                print("corresponding sigma: ", sigma)
            Parameter.checkArray(sigma, softCheck=True, arrayInfo="sigma in svd_from_eigh()")
            Parameter.checkArray(Qh, softCheck=True, arrayInfo="Qh in svd_from_eigh()")
            if not Parameter.checkOrthogonal(Qh.conj().T, tol=tol, softCheck=True, arrayInfo="Qh.H in svd_from_eigh()"):
                print("corresponding sigma: ", sigma)


        return P, sigma, Qh
Test working path of NetworkV2()
dataset/ETHPy150Open charanpald/APGL/apgl/util/Util.py/Util.svd_from_eigh--crossover with--dataset/ETHPy150Open softlayer/jumpgate/tests/jumpgate-tests/network/test_network.py/TestNetworkV2.test_on_get_response_networkv2_public