3e76bcc0528e2cd1584837162b3f286048fcd7ea,python/dgl/graph.py,DGLGraph,set_e_repr_by_id,#DGLGraph#Any#Any#Any#,676

Before Change


        // set
        if is_all(eid):
            // update column
            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:
            // update row
            if utils.is_dict_like(h_uv):
                self._edge_frame.update_rows(eid, h_uv, inplace=inplace)

After Change


            eid = utils.toindex(eid)
            num_edges = len(eid)
        for key, val in he.items():
            nfeats = F.shape(val)[0]
            if nfeats != num_edges:
                raise DGLError("Expect number of features to match number of edges."
                               " Got %d and %d instead." % (nfeats, num_edges))
        // set
        if is_all(eid):
            // update column
            for key, val in he.items():
                self._edge_frame[key] = val
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: dmlc/dgl
Commit Name: 3e76bcc0528e2cd1584837162b3f286048fcd7ea
Time: 2018-10-18
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: 3e76bcc0528e2cd1584837162b3f286048fcd7ea
Time: 2018-10-18
Author: wmjlyjemaine@gmail.com
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: set_n_repr


Project Name: pandas-dev/pandas
Commit Name: 363ff8e22a630c1d4fee21128117f7dfbe37ef67
Time: 2021-01-14
Author: 45562402+rhshadrach@users.noreply.github.com
File Name: pandas/core/apply.py
Class Name: FrameApply
Method Name: apply