MCPcopy
hub / github.com/dmlc/dgl / all_close_sparse

Function all_close_sparse

tests/python/pytorch/sparse/test_elementwise_op_sp.py:18–24  ·  view source on GitHub ↗
(A, row, col, val, shape)

Source from the content-addressed store, hash-verified

16
17
18def all_close_sparse(A, row, col, val, shape):
19 rowA, colA = A.coo()
20 valA = A.val
21 assert torch.allclose(rowA, row)
22 assert torch.allclose(colA, col)
23 assert torch.allclose(valA, val)
24 assert A.shape == shape
25
26
27@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 1

cooMethod · 0.80

Tested by

no test coverage detected