summaryrefslogtreecommitdiff
path: root/ot
diff options
context:
space:
mode:
authorRomain Tavenard <romain.tavenard@univ-rennes2.fr>2019-06-21 13:37:14 +0200
committerRomain Tavenard <romain.tavenard@univ-rennes2.fr>2019-06-21 13:37:14 +0200
commit67d3bd4bf0f593aa611d6bf09bbd3a9c883299ba (patch)
treeeaf3485f2a650743aa44fd3fc22ba3a3f101aac5 /ot
parent18502d6861a4977cbade957f2e48eeb8dbb55414 (diff)
Removed np.abs in Cython code
Diffstat (limited to 'ot')
-rw-r--r--ot/lp/emd_wrap.pyx2
1 files changed, 1 insertions, 1 deletions
diff --git a/ot/lp/emd_wrap.pyx b/ot/lp/emd_wrap.pyx
index ab88d7f..5e055fb 100644
--- a/ot/lp/emd_wrap.pyx
+++ b/ot/lp/emd_wrap.pyx
@@ -127,7 +127,7 @@ def emd_1d_sorted(np.ndarray[double, ndim=1, mode="c"] u_weights,
if metric == 'sqeuclidean':
m_ij = (u[i] - v[j]) ** 2
elif metric == 'cityblock' or metric == 'euclidean':
- m_ij = np.abs(u[i] - v[j])
+ m_ij = abs(u[i] - v[j])
else:
m_ij = dist(u[i].reshape((1, 1)), v[j].reshape((1, 1)),
metric=metric)[0, 0]