Skip to content
Snippets Groups Projects

Add own implementation for printing an unknown function

Merged Stephan Seitz requested to merge seitz/pystencils:function-call-printing into master

Using the SymPy implementation for printing a sympy.Function has some issues:

  • you cannot use cast_func as an argument -> SymPy prints `cast_func(2,float)
  • typed numbers are not typed any more -> e.g. pow(x, 0.25) instead of pow(x, 0.25f)

Maybe a disadvantage or an advantage:

  • arbitrary Functions: sympy.Function('my_function') are now allowed.

Would have prevented commits like:

Fix: type of sqrt(int) was int not floating point type

Edited by Stephan Seitz

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply