From 50d86f3f678d620c4cf342d6000d055138e408b9 Mon Sep 17 00:00:00 2001 From: Stephen Mardson McQuay Date: Tue, 7 Jun 2011 22:41:47 -0600 Subject: [PATCH] faster grid generation --- interp/grid/__init__.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/interp/grid/__init__.py b/interp/grid/__init__.py index 6a4d02e..ac423bc 100644 --- a/interp/grid/__init__.py +++ b/interp/grid/__init__.py @@ -89,10 +89,9 @@ class grid(object): grid object (collection of verts and q). note: the input is indicies, the grid contains verts - """ - p = [self.verts[i] for i in indicies] - q = [self.q[i] for i in indicies] - return grid(p, q) + """ + + return grid(self.verts[indicies], self.q[indicies]) def get_simplex_and_nearest_points(self, X, extra_points = 3): """