455ea48570f1af63b1270c8ccda49fbe3deb9bcc,python/dgl/graph.py,DGLGraph,from_networkx,#DGLGraph#Any#Any#Any#,1022

Before Change


            else:
                return F.tensor(lst)
        if node_attrs is not None:
            attr_dict = {attr : [] for attr in node_attrs}
            for nid in range(self.number_of_nodes()):
                for attr in node_attrs:
                    attr_dict[attr].append(nx_graph.nodes[nid][attr])
            for attr in node_attrs:

After Change


                        attr_dict[key][attrs["id"]] = attrs[key]
            else:
                // XXX: assuming networkx iteration order is deterministic
                for eid, (_, _, attr) in enumerate(nx_graph.edges(data=True)):
                    for key in edge_attrs:
                        attr_dict[key][eid] = attrs[key]
            for attr in edge_attrs:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: dmlc/dgl
Commit Name: 455ea48570f1af63b1270c8ccda49fbe3deb9bcc
Time: 2018-12-04
Author: ly979@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: from_networkx


Project Name: stellargraph/stellargraph
Commit Name: 956f06cd7860dd5387411c28890d87c70dcd8f42
Time: 2020-01-14
Author: Huon.Wilson@data61.csiro.au
File Name: tests/layer/test_rgcn.py
Class Name:
Method Name: get_As


Project Name: gboeing/osmnx
Commit Name: b3aa4931848b64f28239fa334f29f69794ff5a35
Time: 2020-12-03
Author: boeing@usc.edu
File Name: osmnx/utils_graph.py
Class Name:
Method Name: count_streets_per_node