Skip to content

Commit

Permalink
Merge pull request #213 from ev-br/torch_allclose
Browse files Browse the repository at this point in the history
MAINT: avoid a DeprecationWarning from torch
  • Loading branch information
ev-br authored Dec 12, 2024
2 parents d9df003 + 484f725 commit edde2e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vendor_test/uses_torch.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def _test_torch():
assert isinstance(b, torch.Tensor)
assert isinstance(res, torch.Tensor)

torch.testing.assert_allclose(res, [[1., 2., 3.]])
torch.testing.assert_close(res, torch.as_tensor([[1., 2., 3.]]))

assert is_torch_array(res)
assert is_torch_namespace(torch) and is_torch_namespace(torch_compat)
Expand Down

0 comments on commit edde2e0

Please sign in to comment.