We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9c9355f commit 66b27c5Copy full SHA for 66b27c5
1 file changed
src/pyscipopt/expr.pxi
@@ -257,7 +257,7 @@ cdef class Expr:
257
raise TypeError(f"Unsupported base type {type(other)} for exponentiation.")
258
if other <= 0.0:
259
raise ValueError("Base of a**x must be positive, as expression is reformulated to scip.exp(x * scip.log(a)); got %g" % other)
260
- return exp(self * log(other))
+ return exp(self * log(float(other)))
261
262
def __neg__(self):
263
return Expr({v:-c for v,c in self.terms.items()})
0 commit comments