def subgraph(self, vertexIndices):
        Parameter.checkList(vertexIndices, Parameter.checkIndex, (0, self.getNumVertices()))
        vertexIndices = numpy.unique(numpy.array(vertexIndices))
        vList = self.vList.subList(vertexIndices.tolist())

        subGraph = PySparseGraph(vList, self.undirected)
        
        if len(vertexIndices) != 0:
            subGraph.W = self.W[vertexIndices, vertexIndices]

        return subGraph
Pass in a list or set of vertexIndices and returns the subgraph containing
dataset/ETHPy150Open charanpald/APGL/apgl/graph/PySparseGraph.py/PySparseGraph.subgraph