diff --git a/declearn/model/sklearn/_np_vec.py b/declearn/model/sklearn/_np_vec.py index 190e2355b37b2654ce52fe53b4ebb218a5b5c304..4a4b26908c4d160a4eec596f40cf049f14a010bf 100644 --- a/declearn/model/sklearn/_np_vec.py +++ b/declearn/model/sklearn/_np_vec.py @@ -86,7 +86,7 @@ class NumpyVector(Vector): keepdims: bool = False, ) -> Self: # type: ignore coefs = { - key: np.sum(val, axis=axis, keepdims=keepdims) + key: np.array(np.sum(val, axis=axis, keepdims=keepdims)) for key, val in self.coefs.items() } return self.__class__(coefs) diff --git a/declearn/model/torch/_vector.py b/declearn/model/torch/_vector.py index 73b27738c7c54c85473824c7a1f6b91fc0ef0a17..6624d5d5d113386392cca8c7082c1d0c629da904 100644 --- a/declearn/model/torch/_vector.py +++ b/declearn/model/torch/_vector.py @@ -123,7 +123,7 @@ class TorchVector(Vector): ) -> Self: # type: ignore # false-positive; pylint: disable=no-member if isinstance(other, Vector): - return self._apply_operation(other, torch.minimum) + return self._apply_operation(other, torch.maximum) if isinstance(other, float): other = torch.Tensor([other]) return self.apply_func(torch.maximum, other)