()
| 408 | |
| 409 | |
| 410 | def test_data_update(): |
| 411 | data = Data(x=torch.arange(0, 5), y=torch.arange(5, 10)) |
| 412 | other = Data(z=torch.arange(10, 15), x=torch.arange(15, 20)) |
| 413 | data.update(other) |
| 414 | |
| 415 | assert len(data) == 3 |
| 416 | assert torch.equal(data.x, torch.arange(15, 20)) |
| 417 | assert torch.equal(data.y, torch.arange(5, 10)) |
| 418 | assert torch.equal(data.z, torch.arange(10, 15)) |
| 419 | |
| 420 | |
| 421 | def test_data_connected_components(): |