Skip to content

Auto-Derive Functions from SymPy Expressions

Yann Büchau requested to merge 51-sympy-integration into master

This Merge Request refactors many functions in PARMESAN in terms of SymPy expressions. The core new element is the @from_sympy decorator which auto-generates Python functions from SymPy expressions that are automatically @units.ensure- and @bounds.ensure-decorated, thus behave exactly as usual PARMESAN functions. A huge benefit from this is that PARMESAN now has much more auto-generated documentation - the symbol list and each @from_sympy-decorated function has a well-structured, auto-generated docstring with pretty LaTeX formulas and no copy-paste errors! This will ease future development immensely and prevent a whole category of manual errors.

Closes #51 (closed)

Edited by Yann Büchau

Merge request reports