File tree Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
Filter options
Expand file tree Collapse file tree 1 file changed +1
-11
lines changed
Original file line number Diff line number Diff line change @@ -612,17 +612,7 @@ def test_qda_regularization():
612
612
with pytest .warns (linalg .LinAlgWarning , match = msg ):
613
613
y_pred = clf .fit (X2 , y6 )
614
614
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 )
626
616
assert np .any (y_pred != y6 )
627
617
628
618
# Adding a little regularization fixes the fit time error.
You can’t perform that action at this time.
0 commit comments