8000 Test the changes. · scikit-learn/scikit-learn@1e8d7c5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1e8d7c5

Browse files
committed
Test the changes.
1 parent 8fc274b commit 1e8d7c5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/metrics/regression.py

-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ def _check_reg_targets(y_true, y_pred, multioutput):
9191
multioutput_options = (None, 'raw_values', 'uniform_average',
9292
'variance_weighted')
9393
if isinstance(multioutput, string_types) and multioutput not in multioutput_options:
94-
raise ValueError("Invalid multioutput value")
94+
raise ValueError("Invalid multioutput option")
9595

96-
elif multioutput is not None:
96+
elif isinstance(multioutput, string_types) and multioutput is not None and multioutput in multioutput_options:
9797
multioutput = check_array(multioutput, ensure_2d=False)
9898
if n_outputs == 1:
9999
raise ValueError("Custom weights are useful only in "

0 commit comments

Comments
 (0)
0