From: Vivien Maisonneuve Date: Thu, 19 Jun 2014 07:08:45 +0000 (+0200) Subject: Fix Symbol creation X-Git-Tag: 1.0~238 X-Git-Url: https://scm.cri.mines-paristech.fr/git/linpy.git/commitdiff_plain/288355579f9b2160e341e1d48910a66a0124ab04?hp=37b02d24c845fa3c75c48a99e5e658d772b72289 Fix Symbol creation --- diff --git a/pypol/linear.py b/pypol/linear.py index bd7037b..8f73fd3 100644 --- a/pypol/linear.py +++ b/pypol/linear.py @@ -62,7 +62,7 @@ class Expression: for symbol, coefficient in coefficients if coefficient != 0] if len(coefficients) == 0: return Constant(constant) - elif len(coefficients) == 1: + elif len(coefficients) == 1 and constant == 0: symbol, coefficient = coefficients[0] if coefficient == 1: return Symbol(symbol)