(dtype, device)
| 343 | @withCUDA |
| 344 | @pytest.mark.parametrize('dtype', DTYPES) |
| 345 | def test_contiguous(dtype, device): |
| 346 | kwargs = dict(dtype=dtype, device=device) |
| 347 | data = tensor([[0, 1], [1, 0], [1, 2], [2, 1]], **kwargs).t() |
| 348 | |
| 349 | with pytest.raises(ValueError, match="needs to be contiguous"): |
| 350 | EdgeIndex(data) |
| 351 | |
| 352 | adj = EdgeIndex(data.contiguous()).contiguous() |
| 353 | assert isinstance(adj, EdgeIndex) |
| 354 | assert adj.is_contiguous() |
| 355 | |
| 356 | |
| 357 | @withCUDA |
nothing calls this directly
no test coverage detected