Skip to content

Commit

Permalink
Merge pull request #494 from isuruf/cython31
Browse files Browse the repository at this point in the history
cython 3.1 fixes
  • Loading branch information
isuruf authored Sep 29, 2024
2 parents 1296417 + 1e47d95 commit 562ff08
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
3 changes: 0 additions & 3 deletions cmake/cython_test.pyx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# Test that numpy works in Cython:
from numpy cimport ndarray

# Test that libcpp module is present:
from libcpp.vector cimport vector
from libcpp.string cimport string
Expand Down
8 changes: 4 additions & 4 deletions symengine/lib/symengine_wrapper.in.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5135,24 +5135,24 @@ cdef class _Lambdify(object):
return result


cdef double _scipy_callback_lambda_real(int n, double *x, void *user_data) nogil:
cdef double _scipy_callback_lambda_real(int n, double *x, void *user_data) noexcept nogil:
cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
cdef double result
deref(lamb).call(&result, x)
return result

cdef void _ctypes_callback_lambda_real(double *output, const double *input, void *user_data) nogil:
cdef void _ctypes_callback_lambda_real(double *output, const double *input, void *user_data) noexcept nogil:
cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
deref(lamb).call(output, input)

IF HAVE_SYMENGINE_LLVM:
cdef double _scipy_callback_llvm_real(int n, double *x, void *user_data) nogil:
cdef double _scipy_callback_llvm_real(int n, double *x, void *user_data) noexcept nogil:
cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
cdef double result
deref(lamb).call(&result, x)
return result

cdef void _ctypes_callback_llvm_real(double *output, const double *input, void *user_data) nogil:
cdef void _ctypes_callback_llvm_real(double *output, const double *input, void *user_data) noexcept nogil:
cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
deref(lamb).call(output, input)

Expand Down

0 comments on commit 562ff08

Please sign in to comment.