minor: removed useless improts, and changed used appropriate class variable
This commit is contained in:
parent
2471f650bc
commit
c6a9f38046
@ -1,22 +1,19 @@
|
||||
import sys
|
||||
import re
|
||||
from collections import defaultdict
|
||||
import inspect
|
||||
|
||||
import numpy as np
|
||||
import scipy.spatial
|
||||
from scipy.spatial import KDTree
|
||||
|
||||
from interp.baker import run_baker
|
||||
from interp.tools import log
|
||||
from simplex import cell, contains
|
||||
from smcqdelaunay import *
|
||||
from interp.grid.simplex import cell, contains
|
||||
from interp.grid.smcqdelaunay import *
|
||||
|
||||
|
||||
class grid(object):
|
||||
def __init__(self, verts = None, q = None):
|
||||
"""
|
||||
this thing eats two pre-constructed arrays of floats:
|
||||
|
||||
verts = array of arrays (if passed in, will convert to numpy.array)
|
||||
[
|
||||
[x0,y0],
|
||||
@ -28,7 +25,7 @@ class grid(object):
|
||||
|
||||
if verts:
|
||||
self.verts = np.array(verts)
|
||||
self.tree = scipy.spatial.KDTree(self.verts)
|
||||
self.tree = KDTree(self.verts)
|
||||
if q:
|
||||
self.q = np.array(q)
|
||||
|
||||
@ -218,7 +215,6 @@ class delaunay_grid(grid):
|
||||
|
||||
S is S_j from baker's paper : some verts from all point that are not the simplex
|
||||
"""
|
||||
log.debug(inspect.stack()[1][3])
|
||||
log.debug("extra verts: %d" % extra_points)
|
||||
log.debug("simplex size: %d" % simplex_size)
|
||||
|
||||
@ -313,7 +309,7 @@ class delaunay_grid(grid):
|
||||
log.debug('start')
|
||||
qdelaunay_string = get_qdelaunay_dump_str(self)
|
||||
cell_to_cells = []
|
||||
for matcher in grid.cell_re.finditer(qdelaunay_string):
|
||||
for matcher in delaunay_grid.cell_re.finditer(qdelaunay_string):
|
||||
d = matcher.groupdict()
|
||||
|
||||
cell_name = d['cell']
|
||||
|
Loading…
Reference in New Issue
Block a user