6105e441426f97f31d96c54d6f35830028c2b3f6,python/dgl/graph.py,DGLGraph,set_e_repr_by_id,#DGLGraph#Any#Any#,196

Before Change


                self._edge_frame[__REPR__] = h_uv
        else:
            if isinstance(h_uv, dict):
                for key, val in h_uv.items():
                    self._edge_frame[key] = F.scatter_row(self._edge_frame[key], eid, val)
            else:
                self._edge_frame[__REPR__] = F.scatter_row(self._edge_frame[__REPR__], eid, h_uv)

    def get_e_repr(self, u=ALL, v=ALL):
        Get node(s) representation.

After Change


        if is_all(eid):
            num_edges = self.cached_graph.num_edges()
        else:
            eid = utils.toindex(eid)
            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 is_all(eid):
            if isinstance(h_uv, dict):
                for key, val in h_uv.items():
                    self._edge_frame[key] = val
            else:
                self._edge_frame[__REPR__] = h_uv
        else:
            if isinstance(h_uv, dict):
                self._edge_frame[eid] = h_uv
            else:
                self._edge_frame[eid] = {__REPR__ : h_uv}

    def get_e_repr(self, u=ALL, v=ALL):
        Get node(s) representation.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 21

Instances


Project Name: dmlc/dgl
Commit Name: 6105e441426f97f31d96c54d6f35830028c2b3f6
Time: 2018-08-22
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: 6105e441426f97f31d96c54d6f35830028c2b3f6
Time: 2018-08-22
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: 6105e441426f97f31d96c54d6f35830028c2b3f6
Time: 2018-08-22
Author: minjie.wang@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_e_repr


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