diff options
author | AdrienCorenflos <adrien.corenflos@gmail.com> | 2020-04-02 11:11:16 +0100 |
---|---|---|
committer | AdrienCorenflos <adrien.corenflos@gmail.com> | 2020-04-02 11:11:16 +0100 |
commit | a9e69509412338920142c0615a50bc00739144d0 (patch) | |
tree | faac7a2118219367265e1034b2abb8052f7db3f9 | |
parent | 60943d00bab1682d6fac22b1e1ba5e64569b4e78 (diff) |
Remove flatten, it's not useful.
-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 1922785..f4f6861 100644 --- a/ot/lp/__init__.py +++ b/ot/lp/__init__.py @@ -657,7 +657,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[perm_a.flatten()], b[perm_b.flatten()], + G_sorted, indices, cost = emd_1d_sorted(a[perm_a], b[perm_b], 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]])), |