Parses an expression with sympy.
(expr: str)
| 22 | |
| 23 | |
| 24 | def _sympy_parse(expr: str): |
| 25 | """Parses an expression with sympy.""" |
| 26 | py_expr = expr.replace("^", "**") |
| 27 | return sympy_parser.parse_expr( |
| 28 | py_expr, |
| 29 | transformations=( |
| 30 | sympy_parser.standard_transformations |
| 31 | + (sympy_parser.implicit_multiplication_application,) |
| 32 | ), |
| 33 | ) |
| 34 | |
| 35 | |
| 36 | def _parse_latex(expr: str) -> str: |
no outgoing calls
no test coverage detected