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)