MCPcopy
hub / github.com/pyg-team/pytorch_geometric / test_data_update

Function test_data_update

test/data/test_data.py:410–418  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

408
409
410def 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
421def test_data_connected_components():

Callers

nothing calls this directly

Calls 2

updateMethod · 0.95
DataClass · 0.90

Tested by

no test coverage detected