Skip to content

Commit

Permalink
Fix hanlding missing local dict
Browse files Browse the repository at this point in the history
  • Loading branch information
bgyori committed Jul 11, 2023
1 parent fc9a429 commit 87045c8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mira/metamodel/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ def safe_parse_expr(s: str, local_dict=None) -> sympy.Expr:
"""Parse an expression that may contain lambda functions."""
return sympy.parse_expr(get_parseable_expression(s),
local_dict={get_parseable_expression(k): v
for k, v in local_dict.items()})
for k, v in local_dict.items()}
if local_dict else None)

0 comments on commit 87045c8

Please sign in to comment.