pretty print change
This commit is contained in:
@@ -6,8 +6,6 @@ def pretty_print(poly):
|
|||||||
x_terms = []
|
x_terms = []
|
||||||
mixed_terms = []
|
mixed_terms = []
|
||||||
|
|
||||||
has_const = bool(poly.constant_coefficient())
|
|
||||||
|
|
||||||
for monom in poly:
|
for monom in poly:
|
||||||
vars_in_term = [str(v) for v in monom.variables()]
|
vars_in_term = [str(v) for v in monom.variables()]
|
||||||
|
|
||||||
@@ -28,10 +26,8 @@ def pretty_print(poly):
|
|||||||
|
|
||||||
parts = []
|
parts = []
|
||||||
|
|
||||||
if R_terms or (has_const and not r_terms):
|
if R_terms:
|
||||||
parts.append("f(Ri)")
|
parts.append("f(Ri)")
|
||||||
elif has_const:
|
|
||||||
parts.append("1")
|
|
||||||
|
|
||||||
if r_terms:
|
if r_terms:
|
||||||
parts.append("f(ri)")
|
parts.append("f(ri)")
|
||||||
|
|||||||
Reference in New Issue
Block a user