Skip to content

Commit 67d3bd4

Browse files
committed
Removed np.abs in Cython code
1 parent 18502d6 commit 67d3bd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ot/lp/emd_wrap.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def emd_1d_sorted(np.ndarray[double, ndim=1, mode="c"] u_weights,
127127
if metric == 'sqeuclidean':
128128
m_ij = (u[i] - v[j]) ** 2
129129
elif metric == 'cityblock' or metric == 'euclidean':
130-
m_ij = np.abs(u[i] - v[j])
130+
m_ij = abs(u[i] - v[j])
131131
else:
132132
m_ij = dist(u[i].reshape((1, 1)), v[j].reshape((1, 1)),
133133
metric=metric)[0, 0]

0 commit comments

Comments
 (0)