smichr on master
fix(solvers): solve_linear_syst… fix(solvers): solve_linear_syst… fix(solvers): solve_linear_syst… and 1 more (compare)
Absclass as it is suggested that this way it could be useful to substitute functions later when needed in calculations.
Stringclass was discussed in the past, and eventually turned down. (https://groups.google.com/forum/#!topic/sympy/tNm1LDcEXA4) Does anyone remember why it was rejected? I really would like to know.
Named.funccould be a
I was concerned that we may want to give name to non-atomic objects, where
obj.func(*obj.args) must return original one. For me, the fact that
Symbol is broken here does not matter much since it is an atomic object so we won't need to travel the branch beneath it.
lambda can break many things. I have seen many codes in SymPy using
obj.func to return the class of
__array_ufunc__, which are other implementations of python multiple dispatch in the wild
x**2*Derivative(Abs(x), x) + 2*x*Abs(x)which I think is wrong plus I can't think of how to return an unevluated derivative for
simplifyis a big hammer, and you might need only a small function that
__eq__), cache.py:91(wrapper), and compatibility.py:570(ordered). I'm just not sure how difficult it would be to cythonize any one of these (even if it'd be possible), or whether there'd be a perf gain (if it were possible)
pip install symengineand
import symengine as ...)
sympify. I want to
sympifya string with comparison
'u * (dae_t <= 0)'. The comparison is supposed to yield the truth value of it. sympifying this equation works well using SymPy v1.5.1 but does not come through in v1.6 (conda installation). Error message:
unsupported operand type(s) for *: 'Symbol' and 'LessThan'. Any suggestion?
Piecewise((1, dae_t <= 0), (0, True))to convert from boolean to number. I don't know how to easily get that from your string without just rewriting it.
python3 BaikalETK/BaikalETK_main_codegen_driver.pyto generate something useful (note that it uses
multiprocessingto help speed up the process, but still takes ~minutes to complete). Note that this is the command that I used to profile
symengine(replacing calls to sympy.cse() with symengine.cse())