diff --git a/pyproject.toml b/pyproject.toml index 291ea57..09808fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,7 @@ requires = [ "wheel>=0.34.2", "cmake>=3.18", "scikit-build", - "nanobind", + "nanobind>=1.3", "ninja", "pcpp", ] diff --git a/src/wrapper/wrap_isl.cpp b/src/wrapper/wrap_isl.cpp index 4bb6d10..57af55c 100644 --- a/src/wrapper/wrap_isl.cpp +++ b/src/wrapper/wrap_isl.cpp @@ -107,7 +107,9 @@ NB_MODULE(_isl, m) .ENUM_VALUE(isl_stat_, ok) ; - py::enum_(m, "dim_type") + // Arithmetic (i.e. export numerical values) to ensure that out == set, as on + // the C side. + py::enum_(m, "dim_type", py::is_arithmetic()) .ENUM_VALUE(isl_dim_, cst) .ENUM_VALUE(isl_dim_, param) .value("in_", isl_dim_in)