()
| 128 | |
| 129 | |
| 130 | def test_line_graph1(): |
| 131 | N = 5 |
| 132 | G = dgl.from_networkx(nx.star_graph(N)).to(F.ctx()) |
| 133 | G.edata["h"] = F.randn((2 * N, D)) |
| 134 | L = G.line_graph(shared=True) |
| 135 | assert L.num_nodes() == 2 * N |
| 136 | assert F.allclose(L.ndata["h"], G.edata["h"]) |
| 137 | assert G.device == F.ctx() |
| 138 | |
| 139 | |
| 140 | @parametrize_idtype |
nothing calls this directly
no test coverage detected