From 0a0d60f235122fe8d8969eaee6ddeafda33043b6 Mon Sep 17 00:00:00 2001 From: KarhouTam Date: Sun, 28 Jul 2024 18:08:09 +0800 Subject: [PATCH] fix check --- src/py/flwr/server/strategy/aggregate.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/py/flwr/server/strategy/aggregate.py b/src/py/flwr/server/strategy/aggregate.py index b82c5ab4e1d4..eebad83226af 100644 --- a/src/py/flwr/server/strategy/aggregate.py +++ b/src/py/flwr/server/strategy/aggregate.py @@ -55,11 +55,11 @@ def aggregate_inplace(results: List[Tuple[ClientProxy, FitRes]]) -> NDArrays: def _try_inplace( x: NDArray, y: Union[NDArray, float], np_binary_op: np.ufunc ) -> NDArray: - return ( + return ( # type: ignore[no-any-return] np_binary_op(x, y, out=x) if np.can_cast(y, x.dtype, casting="same_kind") else np_binary_op(x, y) - ) # type: ignore[no-any-return] + ) # Let's do in-place aggregation # Get first result, then add up each other