Skip to content

Commit

Permalink
Merge pull request #148 from jan-provaznik/fix-cython-3
Browse files Browse the repository at this point in the history
PyNomad compatibility with Cython 3.0
  • Loading branch information
ctribes committed Aug 8, 2023
2 parents d0de5b7 + b823b02 commit 4ad1592
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions interfaces/PyNomad/PyNomad.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -193,14 +193,16 @@ def optimize(fBB, pX0, pLB, pUB, params, fSurrogate=None):
eParams.append(params[i].encode(u"ascii"))

if fSurrogate is None:
runStatus = runNomad(cb, cbL, <void*> fBB, <vector[double]&> pX0,
runStatus = runNomad(<Callback> cb, <CallbackL> cbL,
<void*> fBB, <vector[double]&> pX0,
<vector[double]&> pLB, <vector[double]&> pUB,
<vector[string]&> eParams,
uFeas.c_ep_ptr,
uInfeas.c_ep_ptr,
nbEvals, nbIters)
else:
runStatus = runNomad(cb, cbL, <void*> fBB, <void*> fSurrogate,
runStatus = runNomad(<Callback> cb, <CallbackL> cbL,
<void*> fBB, <void*> fSurrogate,
<vector[double]&> pX0,
<vector[double]&> pLB, <vector[double]&> pUB,
<vector[string]&> eParams,
Expand Down

0 comments on commit 4ad1592

Please sign in to comment.