X-Git-Url: https://svn.cri.ensmp.fr/git/linpy.git/blobdiff_plain/29ed88d1a15d283ea6f3340a4dd97e8cc7c2d2d4..d06ab92943ec2e10a2bd798ca7c1b5cea395bf34:/pypol/polyhedra.py diff --git a/pypol/polyhedra.py b/pypol/polyhedra.py index 6ef7cc1..fa2a5c6 100644 --- a/pypol/polyhedra.py +++ b/pypol/polyhedra.py @@ -4,7 +4,7 @@ import numbers from . import islhelper from .islhelper import mainctx, libisl -from .linexprs import Expression, Constant +from .linexprs import Expression, Rational from .domains import Domain @@ -219,12 +219,12 @@ def _polymorphic(func): @functools.wraps(func) def wrapper(left, right): if isinstance(left, numbers.Rational): - left = Constant(left) + left = Rational(left) elif not isinstance(left, Expression): raise TypeError('left must be a a rational number ' 'or a linear expression') if isinstance(right, numbers.Rational): - right = Constant(right) + right = Rational(right) elif not isinstance(right, Expression): raise TypeError('right must be a a rational number ' 'or a linear expression')