Skip to content

Commit 457be60

Browse files
committed
fix compile error
1 parent 024019d commit 457be60

2 files changed

Lines changed: 9 additions & 7 deletions

File tree

pplite/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
- Acadia Larsen (2024): initial version.
1111
"""
1212

13-
__version__ = "0.0.54"
13+
__version__ = "0.0.55"
1414

1515
from .linear_algebra import (
1616
Variable, Linear_Expression, Affine_Expression

pplite/polyhedron.pyx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -693,16 +693,18 @@ cdef class NNC_Polyhedron(object):
693693
self.thisptr[0].concatenate_assign(p[0])
694694

695695
def remove_higher_space_dims(self, new_dim):
696-
cdef dim_type d
697-
d = Python_int_to_FLINT_Integer(new_dim)
698-
self.thisptr[0].remove_higher_space_dims(d)
696+
cdef dim_type dim
697+
if isinstance(new_dim, int):
698+
dim = new_dim
699+
self.thisptr[0].remove_higher_space_dims(dim)
699700

700701
def expand_space_dim(self, variable, dim_m):
701-
cdef dim_type d
702-
d = Python_int_to_FLINT_Integer(dim_m)
702+
cdef dim_type dim
703+
if isinstance(dim_m, int):
704+
dim = dim_m
703705
if isinstance(variable, Variable):
704706
var = (<Variable> variable).thisptr
705-
self.thisptr[0].expand_space_dim(var[0], d)
707+
self.thisptr[0].expand_space_dim(var[0], dim)
706708

707709
def minimize(self):
708710
self.thisptr[0].minimize()

0 commit comments

Comments
 (0)