raise TypeError("The indices must be a list or a ndarray.")
sub_G = self
sub_G.W = self.W[np.ix_(ind, ind)]
try:
sub_G.N = len(ind)
except TypeError:
After Change
N = len(ind)
sub_W = self.W.tocsr()[ind, :].tocsc()[:, ind]
return Graph(sub_W, gtype="sub-{}".format(self.gtype))
def is_connected(self, force_recompute=False):
r