a3a05105f0a696a99f0b65384f9bed8e8702256f,test/utils/test_loop.py,,test_add_self_loops,#,5
Before Change
def test_add_self_loops():
edge_index = torch.LongTensor([[0, 1, 0], [1, 0, 0]])
expected_output = [[0, 1, 0, 0, 1], [1, 0, 0, 0, 1]]
output = add_self_loops(edge_index)
assert output.tolist() == expected_output
def test_remove_self_loops():
After Change
def test_add_self_loops():
row = torch.LongTensor([0, 1, 0])
col = torch.LongTensor([1, 0, 0])
expected_output = [[0, 1, 0, 0, 1], [1, 0, 0, 0, 1]]
output = add_self_loops(torch.stack([row, col], dim=0))
assert output.tolist() == expected_output
def test_remove_self_loops():
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 11
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: a3a05105f0a696a99f0b65384f9bed8e8702256f
Time: 2018-04-18
Author: matthias.fey@tu-dortmund.de
File Name: test/utils/test_loop.py
Class Name:
Method Name: test_add_self_loops
Project Name: rusty1s/pytorch_geometric
Commit Name: a3a05105f0a696a99f0b65384f9bed8e8702256f
Time: 2018-04-18
Author: matthias.fey@tu-dortmund.de
File Name: test/utils/test_loop.py
Class Name:
Method Name: test_remove_self_loops
Project Name: rusty1s/pytorch_geometric
Commit Name: a3a05105f0a696a99f0b65384f9bed8e8702256f
Time: 2018-04-18
Author: matthias.fey@tu-dortmund.de
File Name: test/utils/test_coalesce.py
Class Name:
Method Name: test_coalesce
Project Name: rusty1s/pytorch_geometric
Commit Name: a3a05105f0a696a99f0b65384f9bed8e8702256f
Time: 2018-04-18
Author: matthias.fey@tu-dortmund.de
File Name: test/utils/test_loop.py
Class Name:
Method Name: test_add_self_loops