Skip to content

Commit a5f7608

Browse files
committed
Adjust tols in test_glm_sample_weight_consistency to avoid platform specific failures caused by rounding errors
1 parent 3a4430c commit a5f7608

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sklearn/linear_model/_glm/tests/test_glm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ def test_glm_sample_weight_consistency(fit_intercept, alpha, GLMEstimator):
689689

690690
glm1 = GLMEstimator(**glm_params).fit(X, y, sample_weight=sample_weight_1)
691691
glm2 = GLMEstimator(**glm_params).fit(X2, y2, sample_weight=None)
692-
assert_allclose(glm1.coef_, glm2.coef_, **tols)
692+
assert_allclose(glm1.coef_, glm2.coef_, rtol=1e-10, atol=1e-14)
693693

694694

695695
@pytest.mark.parametrize("solver", SOLVERS)

0 commit comments

Comments
 (0)