diff options
author | arolet <antoine.rolet@gmail.com> | 2017-07-21 12:12:21 +0900 |
---|---|---|
committer | arolet <antoine.rolet@gmail.com> | 2017-07-21 12:12:21 +0900 |
commit | dc3bbd4134f0e2b80e0fe72368bdcf9966f434dc (patch) | |
tree | 00c58d3024e1b40c9d285148e9827d5dced64703 /ot/lp/emd_wrap.pyx | |
parent | 1fcb7d0ffbc5b00ed20b5ded2e7f1001dc914d6e (diff) |
Cleaned optimal plan and optimal cost computation
Diffstat (limited to 'ot/lp/emd_wrap.pyx')
-rw-r--r-- | ot/lp/emd_wrap.pyx | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/ot/lp/emd_wrap.pyx b/ot/lp/emd_wrap.pyx index e8fdba4..c4ba125 100644 --- a/ot/lp/emd_wrap.pyx +++ b/ot/lp/emd_wrap.pyx @@ -121,11 +121,6 @@ def emd2_c( np.ndarray[double, ndim=1, mode="c"] a,np.ndarray[double, ndim=1, mo # calling the function EMD_wrap(n1,n2,<double*> a.data,<double*> b.data,<double*> M.data,<double*> G.data,<double*> &cost, maxiter) - - cost=0 - for i in range(n1): - for j in range(n2): - cost+=G[i,j]*M[i,j] return cost |