8000 left-over deprecation of 1d X (#8045) · NelleV/scikit-learn@ca2b55b · GitHub
[go: up one dir, main page]

Skip to content

Commit ca2b55b

Browse files
amuellerNelleV
authored andcommitted
left-over deprecation of 1d X (scikit-learn#8045)
1 parent 66cda1c commit ca2b55b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sklearn/utils/estimator_checks.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
from sklearn.utils.testing import assert_greater_equal
3131
from sklearn.utils.testing import SkipTest
3232
from sklearn.utils.testing import ignore_warnings
33-
from sklearn.utils.testing import assert_warns
3433
from sklearn.utils.testing import assert_dict_equal
3534

3635

@@ -488,11 +487,8 @@ def check_fit2d_predict1d(name, Estimator):
488487
for method in ["predict", "transform", "decision_function",
489488
"predict_proba"]:
490489
if hasattr(estimator, method):
491-
try:
492-
assert_warns(DeprecationWarning,
493-
getattr(estimator, method), X[0])
494-
except ValueError:
495-
pass
490+
assert_raise_message(ValueError, "Reshape your data",
491+
getattr(estimator, method), X[0])
496492

497493

498494
@ignore_warnings

0 commit comments

Comments
 (0)
0