An error occurred while fetching the assigned milestone of the selected merge_request.
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
Activity
Filter activity
create_type('int')
is alwaysint64
since Python types and not C types are assumed by Numpy. The same asfloat
defaults tofloat64
. This is quite confusing and we should maybe disallow that.I'd prefer
int32
but I did not want to change the code. Thoughtint64
would be more explicit what is happening here.Edited by Stephan Seitzadded 1 commit
- b87eeadf - Fix get_type_of_expression for constants like sympy.pi
I changed it to
int
.Edited by Stephan Seitzmentioned in commit e7a8d3ce
Please register or sign in to reply