Skip to content

Commit 562ff08

Browse files
authored
Merge pull request #494 from isuruf/cython31
cython 3.1 fixes
2 parents 1296417 + 1e47d95 commit 562ff08

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

cmake/cython_test.pyx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# Test that numpy works in Cython:
2-
from numpy cimport ndarray
3-
41
# Test that libcpp module is present:
52
from libcpp.vector cimport vector
63
from libcpp.string cimport string

symengine/lib/symengine_wrapper.in.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5135,24 +5135,24 @@ cdef class _Lambdify(object):
51355135
return result
51365136

51375137

5138-
cdef double _scipy_callback_lambda_real(int n, double *x, void *user_data) nogil:
5138+
cdef double _scipy_callback_lambda_real(int n, double *x, void *user_data) noexcept nogil:
51395139
cdef symengine.LambdaRealDoubleVisitor* lamb = <symengine.LambdaRealDoubleVisitor *>user_data
51405140
cdef double result
51415141
deref(lamb).call(&result, x)
51425142
return result
51435143

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

51485148
IF HAVE_SYMENGINE_LLVM:
5149-
cdef double _scipy_callback_llvm_real(int n, double *x, void *user_data) nogil:
5149+
cdef double _scipy_callback_llvm_real(int n, double *x, void *user_data) noexcept nogil:
51505150
cdef symengine.LLVMDoubleVisitor* lamb = <symengine.LLVMDoubleVisitor *>user_data
51515151
cdef double result
51525152
deref(lamb).call(&result, x)
51535153
return result
51545154

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

0 commit comments

Comments
 (0)