Skip to content

Commit

Permalink
fixed cython compile error and np.int
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseLivezey committed Oct 18, 2023
1 parent be6afe7 commit 95867bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/pyuoi/lbfgs/_lowlevel.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ cdef class CallbackData(object):
# Callback into Python evaluation callable.
cdef lbfgsfloatval_t call_eval(void *cb_data_v,
lbfgsconst_p x, lbfgsfloatval_t *g,
int n, lbfgsfloatval_t step):
int n, lbfgsfloatval_t step) noexcept:
cdef object cb_data
cdef np.npy_intp tshape[1]

Expand All @@ -126,7 +126,7 @@ cdef int call_progress(void *cb_data_v,
lbfgsconst_p x, lbfgsconst_p g,
lbfgsfloatval_t fx,
lbfgsfloatval_t xnorm, lbfgsfloatval_t gnorm,
lbfgsfloatval_t step, int n, int k, int ls):
lbfgsfloatval_t step, int n, int k, int ls) noexcept:
cdef object cb_data
cdef np.npy_intp tshape[1]

Expand Down
2 changes: 1 addition & 1 deletion src/pyuoi/mpi_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from mpi4py import MPI
_np2mpi = {np.dtype(np.float32): MPI.FLOAT,
np.dtype(np.float64): MPI.DOUBLE,
np.dtype(np.int): MPI.LONG,
np.dtype(int): MPI.LONG,
np.dtype(np.intc): MPI.INT}
except ImportError:
pass
Expand Down

0 comments on commit 95867bd

Please sign in to comment.