summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortlacombe <lacombe1993@gmail.com>2019-12-16 18:11:27 +0100
committertlacombe <lacombe1993@gmail.com>2019-12-16 18:11:27 +0100
commitb4fcc875393df12f42aea84b918b5b35f99f7283 (patch)
treeecd20ef8936174e23f662dc1048f3f947d4d9228
parent5877b4d3b7aca645ba906dfe0be598b1881d8798 (diff)
correction of typo in _user.rst and of empty array shape in test_wasserstein_barycenter
-rw-r--r--src/python/doc/barycenter_user.rst2
-rwxr-xr-xsrc/python/test/test_wasserstein_barycenter.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/python/doc/barycenter_user.rst b/src/python/doc/barycenter_user.rst
index 1c4cb812..5344583f 100644
--- a/src/python/doc/barycenter_user.rst
+++ b/src/python/doc/barycenter_user.rst
@@ -33,7 +33,7 @@ Note that persistence diagrams must be submitted as (n x 2) numpy arrays and mus
dg3 = np.array([[0.3, 0.6], [0.7, 0.8], [0.2, 0.3]])
dg4 = np.array([])
- bary = gudhi.barycenter.lagrangian_barycenter(pdiagset=[dg1, dg2, dg3, dg4],init=3))
+ bary = gudhi.barycenter.lagrangian_barycenter(pdiagset=[dg1, dg2, dg3, dg4],init=3)
message = "Wasserstein barycenter estimated:"
print(message)
diff --git a/src/python/test/test_wasserstein_barycenter.py b/src/python/test/test_wasserstein_barycenter.py
index 6074f250..ae3f6579 100755
--- a/src/python/test/test_wasserstein_barycenter.py
+++ b/src/python/test/test_wasserstein_barycenter.py
@@ -29,5 +29,5 @@ def test_lagrangian_barycenter():
dg7 = np.array([[0.1, 0.15], [0.1, 0.7], [0.2, 0.22], [0.55, 0.84], [0.11, 0.91], [0.61, 0.75], [0.33, 0.46], [0.12, 0.41], [0.32, 0.48]])
assert np.linalg.norm(lagrangian_barycenter(pdiagset=[dg1, dg2, dg3, dg4],init=3, verbose=False) - res) < 0.001
- assert np.array_equal(lagrangian_barycenter(pdiagset=[dg4, dg5, dg6], verbose=False), np.array([]))
+ assert np.array_equal(lagrangian_barycenter(pdiagset=[dg4, dg5, dg6], verbose=False), shape=(0,2), np.array([]))
assert np.linalg.norm(lagrangian_barycenter(pdiagset=[dg7], verbose=False) - dg7) < 0.001