b24daa6607a1455e7ce88d32b6b52196be38bb73,python/dgl/graph.py,DGLGraph,set_e_repr,#DGLGraph#Any#Any#Any#,141

Before Change


        if u_is_all:
            num_edges = self.cached_graph.num_edges()
        else:
            u = utils.toindex(u)
            v = utils.toindex(v)
            num_edges = max(len(u), len(v))
        if utils.is_dict_like(h_uv):
            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 u_is_all:
            if utils.is_dict_like(h_uv):
                for key, val in h_uv.items():
                    self._edge_frame[key] = val
            else:

After Change


            assert F.shape(h_uv)[0] == num_edges
        // set
        if u_is_all:
            if utils.is_dict_like(h_uv):
                for key, val in h_uv.items():
                    self._edge_frame[key] = val
            else:
                self._edge_frame[__REPR__] = h_uv
        else:
            eid = self.cached_graph.get_edge_id(u, v)
            if utils.is_dict_like(h_uv):
                self._edge_frame[eid] = h_uv
            else:
                self._edge_frame[eid] = {__REPR__ : h_uv}
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: dmlc/dgl
Commit Name: b24daa6607a1455e7ce88d32b6b52196be38bb73
Time: 2018-09-16
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_e_repr


Project Name: dmlc/dgl
Commit Name: b24daa6607a1455e7ce88d32b6b52196be38bb73
Time: 2018-09-16
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_e_repr_by_id


Project Name: dmlc/dgl
Commit Name: b24daa6607a1455e7ce88d32b6b52196be38bb73
Time: 2018-09-16
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_e_repr


Project Name: dmlc/dgl
Commit Name: b24daa6607a1455e7ce88d32b6b52196be38bb73
Time: 2018-09-16
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_n_repr