minor: missed a few Answer-related lines, and my logic in baker.interpolate was incorrect
This commit is contained in:
parent
0577356cd7
commit
2f6c87dd4f
@ -150,7 +150,7 @@ def interpolate(X, R, R_q, S=None, S_q=None, order=2):
|
|||||||
# calculate values only for the simplex triangle
|
# calculate values only for the simplex triangle
|
||||||
phi, qlin = qlinear(X, R, R_q)
|
phi, qlin = qlinear(X, R, R_q)
|
||||||
|
|
||||||
if order in xrange(2, 11) and S:
|
if order in xrange(2, 11) and S is not None:
|
||||||
error_term, abc = get_error(phi, R, R_q, S, S_q, order)
|
error_term, abc = get_error(phi, R, R_q, S, S_q, order)
|
||||||
|
|
||||||
# if a pathological vertex configuration was encountered and
|
# if a pathological vertex configuration was encountered and
|
||||||
|
@ -62,11 +62,11 @@ def scipy_exact_2D(X):
|
|||||||
|
|
||||||
|
|
||||||
def improved_answer(answer, exact):
|
def improved_answer(answer, exact):
|
||||||
if not answer['error']:
|
if not answer.error:
|
||||||
# was probably just a linear interpolation
|
# was probably just a linear interpolation
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if np.abs(answer['final'] - exact) <= np.abs(answer['qlin'] - exact):
|
if np.abs(answer.final - exact) <= np.abs(answer.qlin - exact):
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
|
Loading…
Reference in New Issue
Block a user