MCPcopy Index your code
hub / github.com/dmlc/dgl / check_val_like

Function check_val_like

tests/python/pytorch/sparse/test_sparse_matrix.py:387–391  ·  view source on GitHub ↗
(A, B)

Source from the content-addressed store, hash-verified

385@pytest.mark.parametrize("shape", [(3, 5), (5, 5)])
386def test_val_like(val_shape, shape):
387 def check_val_like(A, B):
388 assert A.shape == B.shape
389 assert A.nnz == B.nnz
390 assert torch.allclose(torch.stack(A.coo()), torch.stack(B.coo()))
391 assert A.val.device == B.val.device
392
393 ctx = F.ctx()
394

Callers 1

test_val_likeFunction · 0.85

Calls 1

cooMethod · 0.80

Tested by

no test coverage detected