3721822e9e3ef2e06b1587c85f0101c7175045c9,python/dgl/graph.py,DGLGraph,set_e_repr_by_id,#DGLGraph#Any#Any#,236

Before Change


          The edge id(s).
        
        // sanity check
        if isinstance(eid, str) and eid == ALL:
            num_edges = self.number_of_edges()
        else:
            eid = utils.convert_to_id_tensor(eid, self.context)
            num_edges = len(eid)
        if isinstance(h_uv, dict):
            for key, val in h_uv.items():
                assert F.shape(val)[0] == num_edges
        else:
            assert F.shape(h_uv)[0] == num_edges
        // set
        if isinstance(eid, str) and eid == ALL:
            if isinstance(h_uv, dict):
                for key, val in h_uv.items():
                    self._edge_frame[key] = val
            else:

After Change


        else:
            assert F.shape(h_uv)[0] == num_edges
        // set
        if is_all(eid):
            if isinstance(h_uv, dict):
                for key, val in h_uv.items():
                    self._edge_frame[key] = val
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


Project Name: dmlc/dgl
Commit Name: 3721822e9e3ef2e06b1587c85f0101c7175045c9
Time: 2018-08-18
Author: minjie.wang@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_e_repr_by_id


Project Name: dmlc/dgl
Commit Name: 3721822e9e3ef2e06b1587c85f0101c7175045c9
Time: 2018-08-18
Author: minjie.wang@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_n_repr


Project Name: dmlc/dgl
Commit Name: 3721822e9e3ef2e06b1587c85f0101c7175045c9
Time: 2018-08-18
Author: minjie.wang@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: get_e_repr


Project Name: dmlc/dgl
Commit Name: 3721822e9e3ef2e06b1587c85f0101c7175045c9
Time: 2018-08-18
Author: minjie.wang@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_e_repr