From 49fc7d21f64669dca659f3bd7315f77f5f8ee9df Mon Sep 17 00:00:00 2001 From: Marvin Pfoertner Date: Fri, 28 Jan 2022 19:46:18 +0100 Subject: [PATCH] Incorporate review comments --- src/probnum/linops/_linear_operator.py | 2 +- src/probnum/linops/_scaling.py | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/probnum/linops/_linear_operator.py b/src/probnum/linops/_linear_operator.py index 15f1e3eb75..f852391b81 100644 --- a/src/probnum/linops/_linear_operator.py +++ b/src/probnum/linops/_linear_operator.py @@ -388,7 +388,7 @@ def _set_property(self, name: str, value: Optional[bool]): if curr_value is not None: assert isinstance(curr_value, bool) - raise ValueError(f"Can not change the value of the matrix property {name}") + raise ValueError(f"Can not change the value of the matrix property {name}.") if not isinstance(value, bool): raise TypeError( diff --git a/src/probnum/linops/_scaling.py b/src/probnum/linops/_scaling.py index 7f2d1329e3..0d6a738ce4 100644 --- a/src/probnum/linops/_scaling.py +++ b/src/probnum/linops/_scaling.py @@ -318,13 +318,13 @@ def _cholesky(self, lower: bool = True) -> Scaling: if self._scalar is not None: if self._scalar <= 0: raise np.linalg.LinAlgError( - "The linear operator is not positive definite" + "The linear operator is not positive definite." ) return Scaling(np.sqrt(self._scalar), shape=self.shape) if np.any(self._factors <= 0): - raise np.linalg.LinAlgError("The linear operator is not positive definite") + raise np.linalg.LinAlgError("The linear operator is not positive definite.") return Scaling(np.sqrt(self._factors)) @@ -355,11 +355,7 @@ def __init__(self, shape, dtype=np.float64): det=det, trace=trace, ) - - # Matrix properties - if self.is_square: - self.is_symmetric = True - self.is_lower_triangular = True +4 self.is_upper_triangular = True self.is_positive_definite = False