Skip to content

Commit 44fde01

Browse files
committed
Merge branch 'm-adapt-to-sklearn-1.1.0' of github.com:DoubleML/doubleml-for-py into m-pep8
2 parents 48f654d + 80d6c9c commit 44fde01

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)