Skip to content

Commit

Permalink
TST: base finite differences on float64 for cross-system homogeneity
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffgortmaker committed May 26, 2018
1 parent 80bd862 commit a7903ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_blp.py
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ def test_extra_demographics(simulated_problem):
])
def test_objective_gradient(simulated_problem, solve_options):
"""Implement central finite differences in a custom optimization routine to test that analytic gradient values
are within 0.1% of estimated values.
are within 1% of estimated values.
"""
simulation, problem, _ = simulated_problem

Expand All @@ -369,7 +369,7 @@ def test_finite_differences(*args):
theta, _, objective_function, _ = args
exact = objective_function(theta)[1]
estimated = np.zeros_like(exact)
change = np.sqrt(np.finfo(options.dtype).eps)
change = np.sqrt(np.finfo(np.float64).eps)
for index in range(theta.size):
theta1 = theta.copy()
theta2 = theta.copy()
Expand Down

0 comments on commit a7903ad

Please sign in to comment.