@staticmethod 
    def shiftLaplacian(W):
        if not scipy.sparse.isspmatrix_csr(W):
            raise ValueError("W is not a csr matrix")
            
        W = scipy.sparse.csr_matrix(W, dtype=numpy.float)

        d = numpy.array(W.sum(0)).ravel()
        d[d!=0] = d[d!=0]**-0.5
        D = scipy.sparse.spdiags(d, 0, d.shape[0], d.shape[0], format='csr')
        
        i = numpy.zeros(W.shape[0])
        i[d!=0] = 1
        I = scipy.sparse.spdiags(i, 0, i.shape[0], i.shape[0], format='csr')
        
        Lhat = I + D.dot(W).dot(D)
        return Lhat
Test whether two stat buffers reference the same file
dataset/ETHPy150Open charanpald/APGL/apgl/graph/GraphUtils.py/GraphUtils.shiftLaplacian--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/posixpath.py/samestat