d8e610c04662817816d5d7cb5de2578cb48f3ddb,pygsp/graphs/graph.py,Graph,subgraph,#Graph#Any#,269

Before Change


            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
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: epfl-lts2/pygsp
Commit Name: d8e610c04662817816d5d7cb5de2578cb48f3ddb
Time: 2015-12-09
Author: lionel.martin@epfl.ch
File Name: pygsp/graphs/graph.py
Class Name: Graph
Method Name: subgraph


Project Name: sony/nnabla
Commit Name: 322a3c34c751fbc150f0351793f9251f1ed7f488
Time: 2019-01-11
Author: stephen.tiedemann@sony.com
File Name: python/test/function/refs.py
Class Name:
Method Name: pooling_2d


Project Name: theislab/scanpy
Commit Name: b19b64c82c7f645f9abcd170994b52862f7091b8
Time: 2017-04-24
Author: f.alex.wolf@gmx.de
File Name: scanpy/tools/dpt.py
Class Name: DPT
Method Name: _detect_branching