Skip to content

Commit a9e6950

Browse files
Remove flatten, it's not useful.
1 parent 60943d0 commit a9e6950

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ot/lp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ def emd_1d(x_a, x_b, a=None, b=None, metric='sqeuclidean', p=1., dense=True,
657657
perm_a = np.argsort(x_a_1d)
658658
perm_b = np.argsort(x_b_1d)
659659

660-
G_sorted, indices, cost = emd_1d_sorted(a[perm_a.flatten()], b[perm_b.flatten()],
660+
G_sorted, indices, cost = emd_1d_sorted(a[perm_a], b[perm_b],
661661
x_a_1d[perm_a], x_b_1d[perm_b],
662662
metric=metric, p=p)
663663
G = coo_matrix((G_sorted, (perm_a[indices[:, 0]], perm_b[indices[:, 1]])),

0 commit comments

Comments
 (0)