Skip to content

Commit

Permalink
Merge branch 'doc_v0.7' of github.com:PythonOT/POT into doc_v0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
rflamary committed May 5, 2020
2 parents dbd8f14 + bd79fff commit e002727
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ot/lp/emd_wrap.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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

Expand Down

0 comments on commit e002727

Please sign in to comment.