Skip to content

Commit

Permalink
Simplify _wrap_weights()
Browse files Browse the repository at this point in the history
  • Loading branch information
dustalov committed Dec 12, 2024
1 parent ec1decd commit 23c9460
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/evalica/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down

0 comments on commit 23c9460

Please sign in to comment.