summaryrefslogtreecommitdiff
path: root/src/python
diff options
context:
space:
mode:
authortlacombe <lacombe1993@gmail.com>2020-02-24 10:14:31 +0100
committertlacombe <lacombe1993@gmail.com>2020-02-24 10:14:31 +0100
commit3e15e9fe5bffb0ffcf8f7f3a0dac1c331646630a (patch)
treed78b2373e15a0274930a213b5534b80dc33e05d9 /src/python
parent59f046cd0f405b124a6e08f26ca7b0248f707374 (diff)
changed double quote into simple quote to be consistent with wasserstein.py
Diffstat (limited to 'src/python')
-rw-r--r--src/python/gudhi/barycenter.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/python/gudhi/barycenter.py b/src/python/gudhi/barycenter.py
index dc9e8241..4e132c23 100644
--- a/src/python/gudhi/barycenter.py
+++ b/src/python/gudhi/barycenter.py
@@ -17,12 +17,12 @@ from gudhi.wasserstein import _build_dist_matrix, _perstot
def _mean(x, m):
- """
+ '''
:param x: a list of 2D-points, off diagonal, x_0... x_{k-1}
:param m: total amount of points taken into account,
that is we have (m-k) copies of diagonal
:returns: the weighted mean of x with (m-k) copies of the diagonal
- """
+ '''
k = len(x)
if k > 0:
w = np.mean(x, axis=0)
@@ -33,7 +33,7 @@ def _mean(x, m):
def _optimal_matching(X, Y, withcost=False):
- """
+ '''
:param X: numpy.array of size (n x 2)
:param Y: numpy.array of size (m x 2)
:param withcost: returns also the cost corresponding to the optimal matching
@@ -44,7 +44,7 @@ def _optimal_matching(X, Y, withcost=False):
if i >= len(X) or j >= len(Y), it means they
represent the diagonal.
They will be encoded by -1 afterwards.
- """
+ '''
n = len(X)
m = len(Y)
@@ -94,7 +94,7 @@ def _optimal_matching(X, Y, withcost=False):
def lagrangian_barycenter(pdiagset, init=None, verbose=False):
- """
+ '''
Returns the estimated barycenter computed with the algorithm provided
by Turner et al (2014).
As the algorithm is not convex, the output depends on initialization.
@@ -129,7 +129,7 @@ def lagrangian_barycenter(pdiagset, init=None, verbose=False):
of observations to the output.
- nb_iter, integer representing the number of iterations
performed before convergence of the algorithm.
- """
+ '''
X = pdiagset # to shorten notations, not a copy
m = len(X) # number of diagrams we are averaging
if m == 0: