Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • pystencils pystencils
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 18
    • Issues 18
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • pycodegen
  • pystencilspystencils
  • Merge requests
  • !96

Add own implementation for printing an unknown function

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Stephan Seitz requested to merge seitz/pystencils:function-call-printing into master Nov 29, 2019
  • Overview 0
  • Commits 2
  • Pipelines 2
  • Changes 2

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 Nov 29, 2019 by Stephan Seitz
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: function-call-printing