diff --git a/pystencils/math_optimizations.py b/pystencils/math_optimizations.py index 0b64b3e7f02a9e2a6a026431a7678286395a2b80..aa866570af196cbb0c32c25920cbfe062d065b21 100644 --- a/pystencils/math_optimizations.py +++ b/pystencils/math_optimizations.py @@ -18,7 +18,7 @@ try: # Evaluates all constant terms evaluate_constant_terms = ReplaceOptim( - lambda e: hasattr(e, 'is_constant') and e.is_constant, + lambda e: hasattr(e, 'is_constant') and e.is_constant and not e.is_integer, lambda p: p.evalf() )