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 c571bde
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 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,8 +233,13 @@ def test_rotated_hyper_ellipsoid(self):
results = nelder_mead(rotated_hyper_ellipsoid, x0, bounds=bounds,
tol_x=1e-30, tol_f=1e-30)

assert_allclose(results.x, sol, atol=1e-7)
assert_allclose(results.fun, fun, atol=1e-7)
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)

def test_booth(self):
x0 = np.array([0., 0.])
Expand Down

0 comments on commit c571bde

Please sign in to comment.