From 3bb54a20cc51c218c3d6b320c3a4e6f04f02cb0b Mon Sep 17 00:00:00 2001 From: Jorn Hoofwijk <jornhoofwijk@gmail.com> Date: Tue, 25 Sep 2018 12:17:31 +0200 Subject: [PATCH] resolve 105 --- adaptive/learner/learnerND.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/adaptive/learner/learnerND.py b/adaptive/learner/learnerND.py index 65ae3e77..a3293b71 100644 --- a/adaptive/learner/learnerND.py +++ b/adaptive/learner/learnerND.py @@ -222,6 +222,7 @@ class LearnerND(BaseLearner): try: self._tri = Triangulation(self.points) + self.update_losses(set(), self._tri.simplices) return self._tri except ValueError: # A ValueError is raised if we do not have enough points or @@ -229,8 +230,6 @@ class LearnerND(BaseLearner): # a valid triangulation return None - # XXX: also compute losses of initial simplex - @property def values(self): return np.array(list(self.data.values()), dtype=float) @@ -359,8 +358,8 @@ class LearnerND(BaseLearner): # Could not find a simplex, this code should never be reached assert self.tri is not None raise AssertionError( - "Could not find a simplex to. Yet there should always be a simplex " - "available if LearnerND.tri() is not None" + "Could not find a simplex to subdivide. Yet there should always be" + "a simplex available if LearnerND.tri() is not None." ) def _ask_best_point(self): -- GitLab