From 4af78812d25b28cee283e671c0bd5944133b6ce5 Mon Sep 17 00:00:00 2001 From: Vivien Maisonneuve Date: Tue, 19 Aug 2014 11:30:21 +0200 Subject: [PATCH 1/1] Variable renaming in LinExpr.scaleint() --- linpy/linexprs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linpy/linexprs.py b/linpy/linexprs.py index e4ed1cc..a49f90e 100644 --- a/linpy/linexprs.py +++ b/linpy/linexprs.py @@ -273,9 +273,9 @@ class LinExpr: Return the expression multiplied by its lowest common denominator to make all values integer. """ - lcm = functools.reduce(lambda a, b: a*b // gcd(a, b), + lcd = functools.reduce(lambda a, b: a*b // gcd(a, b), [value.denominator for value in self.values()]) - return self * lcm + return self * lcd def subs(self, symbol, expression=None): """ -- 2.20.1