Skip to content

Commit

Permalink
Expression simplification removed
Browse files Browse the repository at this point in the history
In certain situations, simplification is taking a significant amount of time for symbolic expressions. This commits removes simplification as a temporary work around. In the long term, need to add this as a toggle option in sheet settings.
  • Loading branch information
mgreminger committed Dec 13, 2023
1 parent f3d8125 commit f969c72
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions public/dimensional_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -1544,14 +1544,14 @@ def get_evaluated_expression(expression: Expr, parameter_subs: dict[Symbol, Expr
expression = replace_placeholder_funcs(expression, "sympy_func")
expression = cast(Expr, expression.doit())
if not is_matrix(expression):
symbolic_expression = custom_latex(cancel(expression))
symbolic_expression = custom_latex(expression)
else:
symbolic_expression = []
for i in range(expression.rows):
row = []
symbolic_expression.append(row)
for j in range(expression.cols):
row.append(custom_latex(cancel(expression[i,j])))
row.append(custom_latex(cast(Expr, expression[i,j])))

evaluated_expression = cast(ExprWithAssumptions, expression.evalf(PRECISION))
return evaluated_expression, symbolic_expression
Expand Down

0 comments on commit f969c72

Please sign in to comment.