summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrienCorenflos <adrien.corenflos@gmail.com>2020-05-05 13:37:08 +0100
committerAdrienCorenflos <adrien.corenflos@gmail.com>2020-05-05 13:37:08 +0100
commitea6642c4873b557b4d284f6f3717d8990e23ad51 (patch)
treea211f4c8acd40240b6991f7fa5b3b845b6c728c3
parentea2890aa3cfbf09a32f8ef3063b6a413f485526b (diff)
fix failing test - cur_idx needs to be incremented by 1 after the loop
-rw-r--r--ot/lp/emd_wrap.pyx1
1 files changed, 1 insertions, 0 deletions
diff --git a/ot/lp/emd_wrap.pyx b/ot/lp/emd_wrap.pyx
index 10bc5cf..d79d0ca 100644
--- a/ot/lp/emd_wrap.pyx
+++ b/ot/lp/emd_wrap.pyx
@@ -203,4 +203,5 @@ def emd_1d_sorted(np.ndarray[double, ndim=1, mode="c"] u_weights,
w_i -= w_j
w_j = v_weights[j]
cur_idx += 1
+ cur_idx += 1
return G[:cur_idx], indices[:cur_idx], cost