def getNumEdges(self):
        if self.getNumVertices()==0:
            return 0

        if self.undirected:
            inds = numpy.arange(self.getNumVertices())
            #d = spmatrix.ll_mat(self.getNumVertices(), 1)
            d = numpy.zeros(self.getNumVertices())
            self.W.take(d, inds, inds)

            return (self.W.nnz + numpy.sum(d!=0))/2
        else:
            return self.W.nnz
Load extensions from the specified paths/packages
dataset/ETHPy150Open charanpald/APGL/apgl/graph/PySparseGraph.py/PySparseGraph.getNumEdges--crossover with--dataset/ETHPy150Open ARM-software/workload-automation/wlauto/core/extension_loader.py/ExtensionLoader.update