dcf8c1f9cef00b2d961a80689a5fc772dabeea8f,torch_geometric/utils/convert.py,,from_networkx,#Any#,75

Before Change


        data[key] = torch.tensor(item)

    if not G.is_directed():
        edge_index = torch.cat((edge_index, edge_index[[1,0],:]), dim=1)
        
    data["edge_index"] = edge_index
    data = torch_geometric.data.Data.from_dict(data)

After Change


        data[key] = torch.tensor(item)

    if not G.is_directed():
        edge_index = to_undirected(edge_index, G.number_of_nodes())
        
    data["edge_index"] = edge_index
    data = torch_geometric.data.Data.from_dict(data)
    data.num_nodes = G.number_of_nodes()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: rusty1s/pytorch_geometric
Commit Name: dcf8c1f9cef00b2d961a80689a5fc772dabeea8f
Time: 2019-06-25
Author: yutai.20m5@gmail.com
File Name: torch_geometric/utils/convert.py
Class Name:
Method Name: from_networkx


Project Name: dmlc/dgl
Commit Name: 653428bdc7880ebc45b759e675df09ae6eb146f8
Time: 2019-06-06
Author: ly979@nyu.edu
File Name: python/dgl/runtime/scheduler.py
Class Name:
Method Name: _gen_reduce


Project Name: stellargraph/stellargraph
Commit Name: 59266e34e076ed25852bccf5ce13025b5408406f
Time: 2019-05-28
Author: andrew.docherty@data61.csiro.au
File Name: stellargraph/mapper/node_mappers.py
Class Name: FullBatchNodeGenerator
Method Name: __init__


Project Name: dmlc/dgl
Commit Name: deb653f8dc9b396ba99d5c66e0658fb056f37a38
Time: 2018-11-22
Author: ly979@nyu.edu
File Name: python/dgl/graph.py
Class Name: DGLGraph
Method Name: recv