7f69a4ff73a73e4b2da4f554ee4640e185aa19a1,test/utils/test_coalesce.py,,test_coalesce,#,5
Before Change
row = torch.LongTensor([1, 0, 1, 0, 2, 1])
col = torch.LongTensor([0, 1, 1, 1, 0, 0])
expected_output = [[0, 1, 1, 2], [1, 0, 1, 0]]
expected_perm = [1, 0, 2, 4]
output, output_perm = coalesce(torch.stack([row, col], dim=0))
assert output.tolist() == expected_output
assert output_perm.tolist() == expected_perm
After Change
edge_attr = [[1, 2], [3, 4], [5, 6], [7, 8], [9, 10], [11, 12]]
edge_attr = torch.tensor(edge_attr)
out, _ = coalesce(edge_index)
assert out.tolist() == [[0, 1, 1, 2], [1, 0, 1, 0]]
out = coalesce(edge_index, edge_attr)
assert out[0].tolist() == [[0, 1, 1, 2], [1, 0, 1, 0]]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: rusty1s/pytorch_geometric
Commit Name: 7f69a4ff73a73e4b2da4f554ee4640e185aa19a1
Time: 2018-05-20
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_coalesce.py
Class Name:
Method Name: test_coalesce
Project Name: rusty1s/pytorch_geometric
Commit Name: d8a075668b6e9cdf4c08f6c7285e5c7d2fbf5332
Time: 2017-10-17
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/graph/geometry.py
Class Name:
Method Name: edges_from_faces