projects
/
linpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Make LinExpr.coefficient() always return a Fraction
[linpy.git]
/
linpy
/
linexprs.py
diff --git
a/linpy/linexprs.py
b/linpy/linexprs.py
index
b2cec53
..
99ad4ec
100644
(file)
--- a/
linpy/linexprs.py
+++ b/
linpy/linexprs.py
@@
-122,7
+122,7
@@
class LinExpr:
"""
if not isinstance(symbol, Symbol):
raise TypeError('symbol must be a Symbol instance')
- return self._coefficients.get(symbol,
0
)
+ return self._coefficients.get(symbol,
Fraction(0)
)
__getitem__ = coefficient