Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8854f58

Browse filesBrowse files
committed
remove failing warnings from tests
1 parent c6a301b commit 8854f58
Copy full SHA for 8854f58

File tree

Expand file treeCollapse file tree

1 file changed

+1
-11
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-11
lines changed

‎sklearn/tests/test_discriminant_analysis.py

Copy file name to clipboardExpand all lines: sklearn/tests/test_discriminant_analysis.py
+1-11Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -612,17 +612,7 @@ def test_qda_regularization():
612612
with pytest.warns(linalg.LinAlgWarning, match=msg):
613613
y_pred = clf.fit(X2, y6)
614614

615-
# XXX: RuntimeWarning is also raised at predict time because of divisions
616-
# by zero when the model is fit with a constant feature and without
617-
# regularization: should this be considered a bug? Either by the fit-time
618-
# message more informative, raising and exception instead of a warning in
619-
# this case or somehow changing predict to avoid division by zero.
620-
with (
621-
pytest.warns(RuntimeWarning, match="divide by zero encountered in log"),
622-
pytest.warns(RuntimeWarning, match="divide by zero encountered in power"),
623-
pytest.warns(RuntimeWarning, match="invalid value encountered in multiply"),
624-
):
625-
y_pred = clf.predict(X2)
615+
y_pred = clf.predict(X2)
626616
assert np.any(y_pred != y6)
627617

628618
# Adding a little regularization fixes the fit time error.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.