Skip to content
Snippets Groups Projects

Fix get_type_of_expression for constants like sympy.pi

Problem: some constant expressions are neither Float,Integer,Rational and don't have arguments.

>>> from sympy import *
>>> isinstance(pi, Integer)
False
>>> isinstance(pi, Float)
False
>>> isinstance(pi, Rational)
False
>>> pi.args
()
Edited by Stephan Seitz

Merge request reports

Pipeline #17422 passed

Pipeline passed for b87eeadf on seitz:fix-get_type_of_expression-for-constants

Merged by Martin BauerMartin Bauer 5 years ago (Aug 22, 2019 6:31am UTC)

Loading

Pipeline #17429 passed

Pipeline passed for e7a8d3ce on master

Test coverage 78.96% from 0 jobs

Activity

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