diff --git a/python-package/lightgbm/engine.py b/python-package/lightgbm/engine.py index 898dbb91a16e..ccbb4376a89f 100644 --- a/python-package/lightgbm/engine.py +++ b/python-package/lightgbm/engine.py @@ -605,10 +605,7 @@ def _agg_cv_result( # [ # (, , mean(), , std_dev()) # ] - return [ - (k[0], k[1], float(np.mean(v)), metric_types[k], float(np.std(v))) - for k, v in metric_values.items() - ] + return [(k[0], k[1], float(np.mean(v)), metric_types[k], float(np.std(v))) for k, v in metric_values.items()] def cv(