summaryrefslogtreecommitdiff
path: root/test/test_optim.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_optim.py')
-rw-r--r--test/test_optim.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_optim.py b/test/test_optim.py
index bc0b706..2840cad 100644
--- a/test/test_optim.py
+++ b/test/test_optim.py
@@ -29,8 +29,8 @@ def test_conditional_gradient():
G, log = ot.optim.cg(a, b, M, reg, f, df, verbose=True, log=True)
- assert np.allclose(a, G.sum(1))
- assert np.allclose(b, G.sum(0))
+ np.testing.assert_allclose(a, G.sum(1))
+ np.testing.assert_allclose(b, G.sum(0))
def test_generalized_conditional_gradient():
@@ -59,5 +59,5 @@ def test_generalized_conditional_gradient():
G, log = ot.optim.gcg(a, b, M, reg1, reg2, f, df, verbose=True, log=True)
- assert np.allclose(a, G.sum(1), atol=1e-05)
- assert np.allclose(b, G.sum(0), atol=1e-05)
+ np.testing.assert_allclose(a, G.sum(1), atol=1e-05)
+ np.testing.assert_allclose(b, G.sum(0), atol=1e-05)