projects
/
linpy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
37b02d2
)
Fix Symbol creation
author
Vivien Maisonneuve
<v.maisonneuve@gmail.com>
Thu, 19 Jun 2014 07:08:45 +0000
(09:08 +0200)
committer
Vivien Maisonneuve
<v.maisonneuve@gmail.com>
Thu, 19 Jun 2014 07:08:45 +0000
(09:08 +0200)
pypol/linear.py
patch
|
blob
|
history
diff --git
a/pypol/linear.py
b/pypol/linear.py
index
bd7037b
..
8f73fd3
100644
(file)
--- 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)
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)
symbol, coefficient = coefficients[0]
if coefficient == 1:
return Symbol(symbol)