Skip to content

Commit

Permalink
use a .05 relative tolerance instead of absolute
Browse files Browse the repository at this point in the history
  • Loading branch information
bwengals committed Sep 28, 2022
1 parent b12c189 commit 5e7d348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pymc/tests/gp/test_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,11 @@ def setup_method(self):
def test_kmeans(self):
X = self.x[:, None]
Xu = pm.gp.util.kmeans_inducing_points(2, X).flatten()
npt.assert_allclose(np.asarray(self.centers), np.sort(Xu), atol=0.1)
npt.assert_allclose(np.asarray(self.centers), np.sort(Xu), rtol=0.05)

X = at.as_tensor_variable(self.x[:, None])
Xu = pm.gp.util.kmeans_inducing_points(2, X).flatten()
npt.assert_allclose(np.asarray(self.centers), np.sort(Xu), atol=0.1)
npt.assert_allclose(np.asarray(self.centers), np.sort(Xu), rtol=0.05)

def test_kmeans_raises(self):
with pytest.raises(TypeError):
Expand Down

0 comments on commit 5e7d348

Please sign in to comment.