def testMaxEigenvector(self):
        tol = 10**-6
        numVertices = 5
        numFeatures = 0
        vList = VertexList(numVertices, numFeatures)

        graph = self.GraphType(vList, False)
        graph.addEdge(0, 1)
        graph.addEdge(1, 2, 0.1)
        graph.addEdge(2, 0)

        v = graph.maxEigenvector()

        W = graph.getWeightMatrix()
        lmbda, U = numpy.linalg.eig(W)
        i = numpy.argmax(lmbda)

        self.assertTrue(numpy.linalg.norm(v - U[:, i]) < tol)
dataset/ETHPy150Open charanpald/APGL/apgl/graph/test/MatrixGraphTest.py/MatrixGraphTest.testMaxEigenvector/swapped operands of `-`