From b2a7970810aa7b5f2e974487b0123163d7607344 Mon Sep 17 00:00:00 2001 From: peastman Date: Fri, 23 Aug 2024 13:57:28 -0700 Subject: [PATCH] Try a more tolerant check --- python/tests/TestTorchForce.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/python/tests/TestTorchForce.py b/python/tests/TestTorchForce.py index c8bcd23..6eefed6 100644 --- a/python/tests/TestTorchForce.py +++ b/python/tests/TestTorchForce.py @@ -87,9 +87,7 @@ def forward(self, positions): assert self.positions.device == self.device assert positions.device == self.device assert positions.dtype == self.dtype - print(positions) - print(self.positions) - assert pt.all(positions == self.positions) + assert pt.allclose(positions, self.positions) return pt.sum(positions) with NamedTemporaryFile() as fd: