Skip to content

Commit bbae9fc

Browse files
committed
add as_scipy to lambdify
1 parent ab87920 commit bbae9fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

symengine/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@
2424
if have_numpy:
2525
from .lib.symengine_wrapper import Lambdify, LambdifyCSE
2626

27-
def lambdify(args, exprs, real=True, backend=None):
27+
def lambdify(args, exprs, real=True, backend=None, as_scipy=False):
2828
try:
2929
len(args)
3030
except TypeError:
3131
args = [args]
32+
if as_scipy:
33+
return Lambdify(args, *exprs, real=real, backend=backend, as_scipy=True)
3234
lmb = Lambdify(args, *exprs, real=real, backend=backend)
3335
def f(*inner_args):
3436
if len(inner_args) != len(args):

0 commit comments

Comments
 (0)