diff options
author | RĂ©mi Flamary <remi.flamary@gmail.com> | 2020-05-05 07:54:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-05 07:54:45 +0200 |
commit | bd79fff09f26c0811074aeb2cbfcbd72082a51e2 (patch) | |
tree | 64c1d078dd2990f6fe7f30b220ccab20ac4763fd /ot | |
parent | 8406caafaef8b3683d6a1d44917c404ba780f82c (diff) | |
parent | 74932a58338ba4712598462d90f90a504840b22f (diff) |
Merge branch 'master' into doc_v0.7
Diffstat (limited to 'ot')
-rw-r--r-- | ot/lp/emd_wrap.pyx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ot/lp/emd_wrap.pyx b/ot/lp/emd_wrap.pyx index b6bda47..c167964 100644 --- a/ot/lp/emd_wrap.pyx +++ b/ot/lp/emd_wrap.pyx @@ -19,7 +19,7 @@ import warnings cdef extern from "EMD.h": - int EMD_wrap(int n1,int n2, double *X, double *Y,double *D, double *G, double* alpha, double* beta, double *cost, int maxIter) + int EMD_wrap(int n1,int n2, double *X, double *Y,double *D, double *G, double* alpha, double* beta, double *cost, int maxIter) nogil cdef enum ProblemType: INFEASIBLE, OPTIMAL, UNBOUNDED, MAX_ITER_REACHED @@ -110,7 +110,8 @@ def emd_c(np.ndarray[double, ndim=1, mode="c"] a, np.ndarray[double, ndim=1, mod G=np.zeros([n1, n2]) # calling the function - result_code = EMD_wrap(n1, n2, <double*> a.data, <double*> b.data, <double*> M.data, <double*> G.data, <double*> alpha.data, <double*> beta.data, <double*> &cost, max_iter) + with nogil: + result_code = EMD_wrap(n1, n2, <double*> a.data, <double*> b.data, <double*> M.data, <double*> G.data, <double*> alpha.data, <double*> beta.data, <double*> &cost, max_iter) return G, cost, alpha, beta, result_code |