a81d27dc67a9c14435b3bd9bf7122fa0871bf76e,python/dgl/cgraph.py,DGLGraph,in_edges,#DGLGraph#Any#,70

Before Change


        if isinstance(v, int):
            edge_array = _CAPI_DGLGraphInEdges_1(self._handle, v)
        else:
            v = utils.Index(v)
            v_array = F.asdglarray(v.totensor())
            edge_array = _CAPI_DGLGraphInEdges_2(self._handle, v_array)
        src = edge_array(0)
        dst = edge_array(1)

After Change


        utils.Index
            The edge ids.
        
        if len(v) == 1:
            edge_array = _CAPI_DGLGraphInEdges_1(self._handle, v[0])
        else:
            v_array = v.todgltensor()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dmlc/dgl
Commit Name: a81d27dc67a9c14435b3bd9bf7122fa0871bf76e
Time: 2018-09-19
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/cgraph.py
Class Name: DGLGraph
Method Name: in_edges


Project Name: commonsense/conceptnet5
Commit Name: 0148088a1b3c05b99f53126b76bf9cf1d1342958
Time: 2018-05-10
Author: rbeaudoin@luminoso.com
File Name: conceptnet5/vectors/propagate.py
Class Name:
Method Name: make_adjacency_matrix


Project Name: dmlc/dgl
Commit Name: a81d27dc67a9c14435b3bd9bf7122fa0871bf76e
Time: 2018-09-19
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/cgraph.py
Class Name: DGLGraph
Method Name: out_edges