(idtype)
| 713 | ) |
| 714 | @parametrize_idtype |
| 715 | def test_adj(idtype): |
| 716 | g = create_test_heterograph(idtype) |
| 717 | adj = g.adj("follows") |
| 718 | assert F.asnumpy(adj.indices()).tolist() == [[0, 1], [1, 2]] |
| 719 | assert np.allclose(F.asnumpy(adj.val), np.array([1, 1])) |
| 720 | g.edata["h"] = {("user", "plays", "game"): F.tensor([1, 2, 3, 4])} |
| 721 | print(g.edata["h"]) |
| 722 | adj = g.adj("plays", "h") |
| 723 | assert F.asnumpy(adj.indices()).tolist() == [[0, 1, 2, 1], [0, 0, 1, 1]] |
| 724 | assert np.allclose(F.asnumpy(adj.val), np.array([1, 2, 3, 4])) |
| 725 | |
| 726 | |
| 727 | @parametrize_idtype |
nothing calls this directly
no test coverage detected