def testNormalisedLaplacianRw(self):
        numVertices = 10
        numFeatures = 0

        vList = VertexList(numVertices, numFeatures)
        graph = SparseGraph(vList)

        ell = 2
        m = 2
        generator = BarabasiAlbertGenerator(ell, m)
        graph = generator.generate(graph)

        k = 10
        W = graph.getSparseWeightMatrix()
        L = GraphUtils.normalisedLaplacianRw(W)

        L2 = graph.normalisedLaplacianRw()

        tol = 10**-6
        self.assertTrue(numpy.linalg.norm(L2 - L) < tol)

        #Test zero rows/cols 
        W = scipy.sparse.csr_matrix((5, 5))
        W[1, 0] = 1
        W[0, 1] = 1
        L = GraphUtils.normalisedLaplacianRw(W)
        
        for i in range(2, 5): 
            self.assertEquals(L[i, i], 0)
dataset/ETHPy150Open charanpald/APGL/apgl/graph/test/GraphUtilsTest.py/AbstractMatrixGraphTest.testNormalisedLaplacianRw/swapped operands of `-`