diff options
author | Rémi Flamary <remi.flamary@gmail.com> | 2020-05-05 08:18:36 +0200 |
---|---|---|
committer | Rémi Flamary <remi.flamary@gmail.com> | 2020-05-05 08:18:36 +0200 |
commit | e0027279f99bf7dbcaa8fb16e018492cb580565c (patch) | |
tree | dd304390eef652037592141ac210bbeba97b6bad | |
parent | dbd8f1485c03e4a680b73be59ab1590a59acbe16 (diff) | |
parent | bd79fff09f26c0811074aeb2cbfcbd72082a51e2 (diff) |
Merge branch 'doc_v0.7' of github.com:PythonOT/POT into doc_v0.7
-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 |