@@ -4507,19 +4507,11 @@ cdef class _Lambdify(object):
4507
4507
cdef _load(self , const string & s):
4508
4508
raise ValueError (" Not supported" )
4509
4509
4510
- cdef void unsafe_real_ptr(self , double * inp, double * out) nogil:
4511
- with gil:
4512
- raise ValueError (" Not supported" )
4513
-
4514
4510
cpdef unsafe_real(self ,
4515
4511
double [::1 ] inp, double [::1 ] out,
4516
4512
int inp_offset = 0 , int out_offset = 0 ):
4517
4513
raise ValueError (" Not supported" )
4518
4514
4519
- cdef void unsafe_complex_ptr(self , double complex * inp, double complex * out) nogil:
4520
- with gil:
4521
- raise ValueError (" Not supported" )
4522
-
4523
4515
cpdef unsafe_complex(self , double complex [::1 ] inp, double complex [::1 ] out,
4524
4516
int inp_offset = 0 , int out_offset = 0 ):
4525
4517
raise ValueError (" Not supported" )
@@ -4705,17 +4697,11 @@ cdef class LambdaDouble(_Lambdify):
4705
4697
self .lambda_double_complex.resize(1 )
4706
4698
self .lambda_double_complex[0 ].init(args_, outs_, cse)
4707
4699
4708
- cdef void unsafe_real_ptr(self , double * inp, double * out) nogil:
4709
- self .lambda_double[0 ].call(out, inp)
4710
-
4711
4700
cpdef unsafe_real(self , double [::1 ] inp, double [::1 ] out, int inp_offset = 0 , int out_offset = 0 ):
4712
- self .unsafe_real_ptr(& inp[inp_offset], & out[out_offset])
4713
-
4714
- cdef void unsafe_complex_ptr(self , double complex * inp, double complex * out) nogil:
4715
- self .lambda_double_complex[0 ].call(out, inp)
4701
+ self .lambda_double[0 ].call(& out[out_offset], & inp[inp_offset])
4716
4702
4717
4703
cpdef unsafe_complex(self , double complex [::1 ] inp, double complex [::1 ] out, int inp_offset = 0 , int out_offset = 0 ):
4718
- self .unsafe_complex_ptr( & inp[inp_offset ], & out[out_offset ])
4704
+ self .lambda_double_complex[ 0 ].call( & out[out_offset ], & inp[inp_offset ])
4719
4705
4720
4706
cpdef as_scipy_low_level_callable(self ):
4721
4707
from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
@@ -4764,11 +4750,8 @@ IF HAVE_SYMENGINE_LLVM:
4764
4750
return llvm_loading_func, (self .args_size, self .tot_out_size, self .out_shapes, self .real, \
4765
4751
self .n_exprs, self .order, self .accum_out_sizes, self .numpy_dtype, s)
4766
4752
4767
- cdef void unsafe_real_ptr(self , double * inp, double * out) nogil:
4768
- self .lambda_double[0 ].call(out, inp)
4769
-
4770
4753
cpdef unsafe_real(self , double [::1 ] inp, double [::1 ] out, int inp_offset = 0 , int out_offset = 0 ):
4771
- self .unsafe_real_ptr( & inp[inp_offset ], & out[out_offset ])
4754
+ self .lambda_double[ 0 ].call( & out[out_offset ], & inp[inp_offset ])
4772
4755
4773
4756
cpdef as_scipy_low_level_callable(self ):
4774
4757
from ctypes import c_double, c_void_p, c_int, cast, POINTER, CFUNCTYPE
0 commit comments