diff --git a/python/_project.pyx b/python/_project.pyx index 7e5eb89..3ccf7ad 100644 --- a/python/_project.pyx +++ b/python/_project.pyx @@ -22,7 +22,7 @@ cdef extern from "project_tool.hpp" namespace "": @cython.boundscheck(False) @cython.cdivision(True) @cython.wraparound(False) -cdef int interp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, +cdef void interp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, DTYPE_t z, DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval) nogil: @@ -81,7 +81,7 @@ cdef int interp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, @cython.boundscheck(False) @cython.cdivision(True) @cython.wraparound(False) -cdef int ngp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, +cdef void ngp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, DTYPE_t z, DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval) nogil: @@ -111,7 +111,7 @@ cdef int ngp3d_INTERNAL_periodic(DTYPE_t x, DTYPE_t y, @cython.boundscheck(False) @cython.cdivision(True) @cython.wraparound(False) -cdef int ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y, +cdef void ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y, DTYPE_t z, DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval, DTYPE_t inval) nogil: @@ -132,6 +132,7 @@ cdef int ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y, if ((ix < 0) or (ix+1) >= Ngrid or (iy < 0) or (iy+1) >= Ngrid or (iz < 0) or (iz+1) >= Ngrid): retval[0] = inval + return retval[0] = d[ix ,iy ,iz ] @@ -139,7 +140,7 @@ cdef int ngp3d_INTERNAL(DTYPE_t x, DTYPE_t y, @cython.boundscheck(False) @cython.cdivision(True) @cython.wraparound(False) -cdef int interp3d_INTERNAL(DTYPE_t x, DTYPE_t y, +cdef void interp3d_INTERNAL(DTYPE_t x, DTYPE_t y, DTYPE_t z, DTYPE_t[:,:,:] d, DTYPE_t Lbox, DTYPE_t *retval, DTYPE_t inval) nogil: @@ -163,6 +164,7 @@ cdef int interp3d_INTERNAL(DTYPE_t x, DTYPE_t y, if ((ix < 0) or (ix+1) >= Ngrid or (iy < 0) or (iy+1) >= Ngrid or (iz < 0) or (iz+1) >= Ngrid): retval[0] = inval + return # assert ((ix >= 0) and ((ix+1) < Ngrid)) # assert ((iy >= 0) and ((iy+1) < Ngrid)) # assert ((iz >= 0) and ((iz+1) < Ngrid))