y += 1 + abs(y.min())
// Estimators in mono_output_task_error raise ValueError if y is of 1-D
// Convert into a 2-D y for those estimators.
if _safe_tags(estimator, "multioutput_only"):
return np.reshape(y, (-1, 1))
return y
After Change
y += 1 + abs(y.min())
// Estimators in mono_output_task_error raise ValueError if y is of 1-D
// Convert into a 2-D y for those estimators.
if estimator._get_tags()["multioutput_only"]:
return np.reshape(y, (-1, 1))
return y