diff --git a/interp/grid/__init__.py b/interp/grid/__init__.py index cc1f0c1..3e989da 100644 --- a/interp/grid/__init__.py +++ b/interp/grid/__init__.py @@ -50,7 +50,7 @@ class grid(object): simplex = None checked_faces = [] - faces_to_check = self.faces_for_vert[closest_point] + faces_to_check = list(self.faces_for_vert[closest_point]) attempts = 0 while not simplex and faces_to_check: @@ -66,14 +66,14 @@ class grid(object): simplex = cur_face continue - new_facest = [] for neighbor in cur_face.neighbors: if (neighbor not in checked_faces) and (neighbor not in faces_to_check): faces_to_check.append(neighbor) if not simplex: - raise AssertionError('no containing simplex found') + raise Exception('no containing simplex found') + log.debug("simplex vert indicies: %s" % simplex.verts) R = self.create_mesh(simplex.verts) log.debug('total attempts before finding simplex: %d' % attempts) @@ -106,7 +106,7 @@ class grid(object): # and some UNIQUE extra verts (dist, indicies) = self.tree.query(X, simplex_size + extra_points) - log.info("extra indicies: %s" % indicies) + log.debug("extra indicies: %s" % indicies) unique_indicies = [] for index in indicies: @@ -196,13 +196,12 @@ class delaunay_grid(grid): simplex = cur_face continue - new_facest = [] for neighbor in cur_face.neighbors: if (neighbor not in checked_faces) and (neighbor not in faces_to_check): faces_to_check.append(neighbor) if not simplex: - raise AssertionError('no containing simplex found') + raise Exception('no containing simplex found') R = self.create_mesh(simplex.verts)