updated imports, and changed smberror to Exception

This commit is contained in:
Stephen McQuay 2010-10-23 17:06:11 -06:00
parent 02b311f72d
commit 7d32f4391f
2 changed files with 7 additions and 7 deletions

View File

@ -5,8 +5,8 @@ from optparse import OptionParser
import numpy as np
from baker.tools import rms, exact_func
from grid.DD import random_grid, rect_grid
from interp.tools import rms, exact_func
from interp.grid.DD import random_grid, rect_grid
def get_mesh(source, destination, use_structured_grid = False):
@ -80,7 +80,7 @@ if __name__ == '__main__':
errors = []
success = 0
for X in mesh_dest.points:
for X in mesh_dest.verts:
answer = mesh_source.run_baker(X)

View File

@ -4,9 +4,9 @@ import sys
import pickle
import pdb
from grid.DD import rect_grid, random_grid
from baker import run_baker
from baker.tools import exact_func, smberror
from interp.grid.DD import rect_grid, random_grid
from interp.baker import run_baker
from interp.tools import exact_func
qfile = '/tmp/grid_regular.txt'
@ -32,7 +32,7 @@ if __name__ == '__main__':
print "S for nearest-neighbor:\n", S
print "trying to run baker"
print run_baker(X, R, S)
except smberror as e:
except Exception as e:
print "caught error: %s" % e
print "trying to get simplex and nearest points using connectivity scheme"