From 23c946090a3d882aeccf31b55125a5547e196a11 Mon Sep 17 00:00:00 2001 From: Dmitry Ustalov Date: Thu, 12 Dec 2024 23:46:49 +0100 Subject: [PATCH] Simplify _wrap_weights() --- python/evalica/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/evalica/__init__.py b/python/evalica/__init__.py index c155486..8a2b61c 100644 --- a/python/evalica/__init__.py +++ b/python/evalica/__init__.py @@ -46,7 +46,7 @@ def _wrap_weights(weights: Collection[float] | None, n: int) -> Collection[float]: if weights is None: - return np.repeat(1., n) + return [1.] * n assert np.isfinite(weights).all(), "weights must be finite" # type: ignore[call-overload]