Skip to content

Commit a8e3e28

Browse files
committed
tensors need to be on the same device for comparison
1 parent 83b667e commit a8e3e28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/test_std.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ def test_std(dtype, device, bias):
1616

1717
out = scatter_std(src, index, dim=-1, unbiased=bias)
1818
std = src.std(dim=-1, unbiased=bias)[0].item()
19-
expected = torch.tensor([[std, 0], [0, std]], dtype=out.dtype)
19+
expected = tensor([[std, 0], [0, std]], dtype, device)
2020
assert torch.allclose(out, expected)

0 commit comments

Comments
 (0)