1af176a6e0
also did some pep8/pyflakes cleanup
16 lines
430 B
Python
16 lines
430 B
Python
import scipy.spatial
|
|
|
|
from interp.grid import grid as basegrid
|
|
|
|
|
|
class dgrid(basegrid):
|
|
def __init__(self, points, values):
|
|
self.points = points
|
|
self.values = values
|
|
self.triangulation = scipy.spatial.Delaunay(points)
|
|
self.simplices = self.triangulation.vertices
|
|
self.tree = scipy.spatial.KDTree(points)
|
|
|
|
def find_simplex(self, X):
|
|
return self.triangulation.find_simplex(X)
|