Skip to content

[Feature&Fix] Add sympy_to_func #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Aug 30, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix bug in _cvt_to_key
  • Loading branch information
HydrogenSulfate committed Aug 27, 2023
commit f8a3d3b8f0752cb02fe177f0c7357bf3fcbc5cff
2 changes: 1 addition & 1 deletion ppsci/utils/sym_to_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def _cvt_to_key(expr: sp.Basic) -> str:
# use name of custom function instead of itself.
return expr.name
else:
str(expr)
return str(expr)
elif isinstance(expr, sp.Derivative):
# convert Derivative(u(x,y),(x,2),(y,2)) to "u__x__x__y__y"
expr_str = expr.args[0].name
Expand Down