Skip to content

Commit e002727

Browse files
committed
Merge branch 'doc_v0.7' of github.com:PythonOT/POT into doc_v0.7
2 parents dbd8f14 + bd79fff commit e002727

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

ot/lp/emd_wrap.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import warnings
1919

2020

2121
cdef extern from "EMD.h":
22-
int EMD_wrap(int n1,int n2, double *X, double *Y,double *D, double *G, double* alpha, double* beta, double *cost, int maxIter)
22+
int EMD_wrap(int n1,int n2, double *X, double *Y,double *D, double *G, double* alpha, double* beta, double *cost, int maxIter) nogil
2323
cdef enum ProblemType: INFEASIBLE, OPTIMAL, UNBOUNDED, MAX_ITER_REACHED
2424

2525

@@ -110,7 +110,8 @@ def emd_c(np.ndarray[double, ndim=1, mode="c"] a, np.ndarray[double, ndim=1, mod
110110
G=np.zeros([n1, n2])
111111

112112
# calling the function
113-
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)
113+
with nogil:
114+
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)
114115

115116
return G, cost, alpha, beta, result_code
116117

0 commit comments

Comments
 (0)