@@ -4338,16 +4338,21 @@ cdef class _Lambdify(object):
4338
4338
cdef public str order
4339
4339
cdef vector[int ] accum_out_sizes
4340
4340
cdef object numpy_dtype
4341
- cdef args
4342
- cdef tuple exprs
4343
-
4344
- def __cinit__ (self , args , *exprs , cppbool real = True , order = ' C' ):
4345
- cdef vector[int ] out_sizes
4346
- self .args = np.asanyarray(args)
4347
- self .args_size = self .args.size
4348
- self .exprs = tuple (np.asanyarray(expr) for expr in exprs)
4349
- self .out_shapes = [expr.shape for expr in self .exprs]
4350
- self .n_exprs = len (self .exprs)
4341
+
4342
+ def __init__ (self , args , *exprs , cppbool real = True , order = ' C' ):
4343
+ cdef:
4344
+ Basic e_
4345
+ size_t ri, ci, nr, nc
4346
+ symengine.MatrixBase * mtx
4347
+ RCP[const symengine.Basic] b_
4348
+ symengine.vec_basic args_, outs_
4349
+ vector[int ] out_sizes
4350
+
4351
+ args = np.asanyarray(args)
4352
+ self .args_size = args.size
4353
+ exprs = tuple (np.asanyarray(expr) for expr in exprs)
4354
+ self .out_shapes = [expr.shape for expr in exprs]
4355
+ self .n_exprs = len (exprs)
4351
4356
self .real = real
4352
4357
self .order = order
4353
4358
self .numpy_dtype = np.float64 if self .real else np.complex128
@@ -4362,19 +4367,11 @@ cdef class _Lambdify(object):
4362
4367
for j in range (i):
4363
4368
self .accum_out_sizes[i] += out_sizes[j]
4364
4369
4365
- def __init__ (self , *args , **kwargs ):
4366
- cdef:
4367
- Basic e_
4368
- size_t ri, ci, nr, nc
4369
- symengine.MatrixBase * mtx
4370
- RCP[const symengine.Basic] b_
4371
- symengine.vec_basic args_, outs_
4372
-
4373
- for arg in np.ravel(self .args, order = self .order):
4370
+ for arg in np.ravel(args, order = self .order):
4374
4371
e_ = _sympify(arg)
4375
4372
args_.push_back(e_.thisptr)
4376
4373
4377
- for curr_expr in self . exprs:
4374
+ for curr_expr in exprs:
4378
4375
if curr_expr.ndim == 0 :
4379
4376
e_ = _sympify(curr_expr.item())
4380
4377
outs_.push_back(e_.thisptr)
0 commit comments