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 6
    • Merge requests 6
  • 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
  • !14

Remove floor, ceiling for integer symbols

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Stephan Seitz requested to merge seitz/pystencils:remove_floor_ceiling_for_integers into master Aug 02, 2019
  • Overview 0
  • Commits 7
  • Pipelines 1
  • Changes 6

Original Intent

Allow optimizations by SymPy when we know that a TypedSymbol is_integer or is_real (e.g. drop rounding functions).

We can deduce some of those properties with Numpy's type system (https://docs.scipy.org/doc/numpy-1.13.0/reference/arrays.scalars.html). We have to be careful since all the is_* methods have ternary logic (True, False, None== we don't know).

Field.Access can take advantage of those optimizations by making it a subclass of TypedSymbol.

Extended Changes

By writing a test I realized that it would be handy to compare AssignmentCollections and use the functions find, match, subs, replace of SymPy.

Edited Aug 02, 2019 by Stephan Seitz
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: remove_floor_ceiling_for_integers