diff options
author | AdrienCorenflos <adrien.corenflos@gmail.com> | 2020-04-01 12:14:42 +0100 |
---|---|---|
committer | AdrienCorenflos <adrien.corenflos@gmail.com> | 2020-04-01 12:14:42 +0100 |
commit | 592f933085d5b521a440eb91eccc283c43732170 (patch) | |
tree | 13906f346e7154a5c14206155fb1343f09f39d91 /ot/lp | |
parent | fa06bb377d083c61f1ac0b067aeeab0fca2b5e7b (diff) |
Fix ordering
Diffstat (limited to 'ot/lp')
-rw-r--r-- | ot/lp/__init__.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ot/lp/__init__.py b/ot/lp/__init__.py index cdd505d..4c968ca 100644 --- a/ot/lp/__init__.py +++ b/ot/lp/__init__.py @@ -656,7 +656,7 @@ def emd_1d(x_a, x_b, a=None, b=None, metric='sqeuclidean', p=1., dense=True, perm_a = np.argsort(x_a_1d) perm_b = np.argsort(x_b_1d) - G_sorted, indices, cost = emd_1d_sorted(a, b, + G_sorted, indices, cost = emd_1d_sorted(a[perm_a.flatten()], b[perm_b.flatten()], x_a_1d[perm_a], x_b_1d[perm_b], metric=metric, p=p) G = coo_matrix((G_sorted, (perm_a[indices[:, 0]], perm_b[indices[:, 1]])), |