elif number[1].is_zero and number[1].is_Integer and prec is None:
leaves.insert(0, Number.from_mp(number[0], prec))
else:
real = Number.from_mp(number[0], prec)
imag = Number.from_mp(number[1], prec)
leaves.insert(0, Complex(real, imag))
if not leaves:
return Integer(1)
After Change
if number is not None:
if number[1].is_zero and is_real:
leaves.insert(0, from_sympy(number[0]))
elif number[1].is_zero and number[1].is_Integer and prec is None:
leaves.insert(0, from_sympy(number[0]))
else: