我希望simplify
with:flat
评估3 * x * y * z
to (* 3 x y z)
。相反,结果是(* 3 (* x y z))
。为什么?
例子
w = Int('w')
x = Int('x')
y = Int('y')
z = Int('z')
print simplify(w * x * y * z, flat=True).num_args() # 4, which we expected
print simplify(3 * x * y * z, flat=True).num_args() # 2, why not 4?