Skip to content

Commit 2d5ccf3

Browse files
committed
Avoid returing numpy.float64 in calc_metrics
1 parent e999f88 commit 2d5ccf3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rectools/metrics/scoring.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,4 +211,4 @@ def calc_metrics( # noqa # pylint: disable=too-many-branches,too-many-locals,t
211211
if len(results) < expected_results_len:
212212
warnings.warn("Custom metrics are not supported.")
213213

214-
return results
214+
return {k: v.item() if hasattr(v, "item") else v for k, v in results.items()}

0 commit comments

Comments
 (0)