Skip to content

Commit

Permalink
[TOBESQUASHED] test_nelder_mead: Expect test_rotated_hyper_ellipsoid …
Browse files Browse the repository at this point in the history
…fails on darwin
  • Loading branch information
rht committed Dec 9, 2018
1 parent 58c2c74 commit ecf400b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions quantecon/optimize/tests/test_nelder_mead.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,6 @@ def test_perm_function(self):
assert_allclose(results.fun, fun, atol=1e-7)

def test_rotated_hyper_ellipsoid(self):
if platform == 'darwin':
# skip for darwin
return
d = 5
x0 = np.random.normal(size=d)
bounds = np.array([[-65.536, 65.536]] * d)
Expand All @@ -236,6 +233,11 @@ def test_rotated_hyper_ellipsoid(self):
results = nelder_mead(rotated_hyper_ellipsoid, x0, bounds=bounds,
tol_x=1e-30, tol_f=1e-30)

#if platform == 'darwin':
# # TODO investigate on darwin why the result is not allclose
# assert not np.allclose(results.x, sol, atol=1e-7)
# assert not np.allclose(results.fun, fun, atol=1e-7)
#else:
assert_allclose(results.x, sol, atol=1e-7)
assert_allclose(results.fun, fun, atol=1e-7)

Expand Down

0 comments on commit ecf400b

Please sign in to comment.