From 3c336ce8693c0a5f883bf35ca31deea5cd2eefd5 Mon Sep 17 00:00:00 2001 From: Stephen Mardson McQuay Date: Tue, 22 Mar 2011 14:13:52 -0600 Subject: [PATCH] removed pointless log lines, and reenabled a throw exception is attempts to find containing simplex goes past 200 --- interp/grid/__init__.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/interp/grid/__init__.py b/interp/grid/__init__.py index c1eba74..1e0f74b 100644 --- a/interp/grid/__init__.py +++ b/interp/grid/__init__.py @@ -29,10 +29,7 @@ class grid(object): self.tree = KDTree(self.verts) if q != None: - log.debug("found q") self.q = np.array(q) - else: - log.debug("no q") self.cells = {} self.cells_for_vert = defaultdict(list) @@ -58,8 +55,8 @@ class grid(object): while not simplex and cells_to_check: attempts += 1 - # if attempts > 20: - # raise Exception("probably recursing to many times") + if attempts > 200: + raise Exception("Is the search becoming exhaustive?") cur_cell = cells_to_check.pop(0) checked_cells.append(cur_cell)