Skip to content

Commit

Permalink
Revert "refactor: simplify function wrapper detection logic"
Browse files Browse the repository at this point in the history
This reverts commit 303f07b.
  • Loading branch information
mgreminger committed Jan 17, 2025
1 parent 303f07b commit 100844e
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 @@ -1601,9 +1601,9 @@ def replace_placeholder_funcs(expr: Expr,
function_parents: list[Basic],
data_table_subs: DataTableSubs | None) -> Expr:

if (not is_matrix(expr)) and expr.func == function_id_wrapper:
while (not is_matrix(expr)) and expr.func == function_id_wrapper:
function_parents.append(expr.args[0])
return replace_placeholder_funcs(cast(Expr, expr.args[1]), func_key, placeholder_map, placeholder_set, dim_values_dict, function_parents, data_table_subs)
expr = cast(Expr, expr.args[1])

if (not is_matrix(expr)) and isinstance(expr, Symbol) and expr.name == "_zero_delayed_substitution":
return S.Zero
Expand Down

0 comments on commit 100844e

Please sign in to comment.