diff --git a/mathics/core/convert/sympy.py b/mathics/core/convert/sympy.py index 843d679f3..bb7bfe887 100644 --- a/mathics/core/convert/sympy.py +++ b/mathics/core/convert/sympy.py @@ -463,7 +463,10 @@ def old_from_sympy(expr) -> BaseElement: else: factors.append(Expression(SymbolPower, slot, from_sympy(exp))) if factors: - result.append(Expression(SymbolTimes, *factors)) + if len(factors) == 1: + result.append(factors[0]) + else: + result.append(Expression(SymbolTimes, *factors)) else: result.append(Integer1) return Expression(SymbolFunction, Expression(SymbolPlus, *result))