(self)
| 23 | self.assertEqual((2, 2), sparse_subgraph.edges.shape.sizes) |
| 24 | |
| 25 | def test_batch_slice(self): |
| 26 | x = vec(x=[0, 1, 2], y=0) |
| 27 | deltas = math.pairwise_differences(x, max_distance=.2, format='coo') |
| 28 | distances = math.vec_length(deltas) |
| 29 | g = graph(x, distances, {}) |
| 30 | stacked = stack([g, g], batch('b')) |
| 31 | g0 = stacked.b[0] |
| 32 | self.assertNotIn('b', g0.nodes.shape) |
| 33 | self.assertNotIn('b', g0.edges.shape) |