|
6 | 6 | import tempfile |
7 | 7 | import subprocess |
8 | 8 | import importlib |
9 | | -from functools import wraps |
| 9 | +from functools import wraps, partial |
10 | 10 | import warnings |
11 | 11 | from distutils.ccompiler import new_compiler |
12 | 12 | from distutils.errors import CompileError |
@@ -372,7 +372,8 @@ def integration_function(x): |
372 | 372 | return sm.lambdify( |
373 | 373 | (states, inputs, params), expr, |
374 | 374 | modules=[{int_placeholder.name: integration_function}, "numpy"], |
375 | | - cse=True) |
| 375 | + cse=partial(sm.cse, order='none', list=False), |
| 376 | + docstring_limit=0) |
376 | 377 |
|
377 | 378 | def parse_expr(expr, in_integral=False): |
378 | 379 | if not expr.args: |
@@ -616,7 +617,10 @@ def lambdify_matrix(args, expr): |
616 | 617 | - ``argn`` : ndarray shape(n,) or float |
617 | 618 |
|
618 | 619 | """ |
619 | | - eval_single_mat = sm.lambdify(args, expr, modules='numpy', cse=True) |
| 620 | + eval_single_mat = sm.lambdify(args, expr, modules='numpy', |
| 621 | + cse=partial(sm.cse, order='none', |
| 622 | + list=False), |
| 623 | + docstring_limit=0) |
620 | 624 |
|
621 | 625 | # TODO : this is terribly computationally costly but there is not a clean |
622 | 626 | # way to do this using appropriate broadcasting via lambdify. See: |
|
0 commit comments