Skip to content

Commit 86ef75c

Browse files
authored
Merge pull request #149 from DoubleML/m-adapt-to-sklearn-1.1.0
Adapt to sklearn 1.1.0
2 parents 0690cc6 + 80d6c9c commit 86ef75c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doubleml/tests/test_dml_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def test_dml_data_w_missings(generate_data_irm_w_missings):
462462
_ = DoubleMLData.from_arrays(x, y, d,
463463
force_all_x_finite='allow-nan')
464464

465-
msg = r"Input contains NaN, infinity or a value too large for dtype\('float64'\)."
465+
msg = r"Input contains NaN."
466466
with pytest.raises(ValueError, match=msg):
467467
_ = DoubleMLData.from_arrays(x, y, d,
468468
force_all_x_finite=True)
@@ -504,7 +504,7 @@ def test_dml_data_w_missings(generate_data_irm_w_missings):
504504
y_col='y', d_cols='d',
505505
force_all_x_finite='allownan')
506506

507-
msg = r"Input contains NaN, infinity or a value too large for dtype\('float64'\)."
507+
msg = r"Input contains NaN."
508508
with pytest.raises(ValueError, match=msg):
509509
dml_data.force_all_x_finite = True
510510

doubleml/tests/test_irm_with_missings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,6 @@ def test_irm_exception_with_missings(generate_data_irm_w_missings, learner_sklea
144144
dml_irm_obj = dml.DoubleMLIRM(obj_dml_data,
145145
ml_g, ml_m)
146146

147-
msg = r"Input contains NaN, infinity or a value too large for dtype\('float64'\)."
147+
msg = r"Input X contains NaN.\nLinearRegression does not accept missing values encoded as NaN natively."
148148
with pytest.raises(ValueError, match=msg):
149149
dml_irm_obj.fit()

0 commit comments

Comments
 (0)