Skip to content

Error in the generated _isl.py

MWE:

import islpy as isl

class DummyClass():
    "Dummy class"

space = isl.Space.create_from_names(isl.DEFAULT_CONTEXT, set=["i"])
bset = isl.BasicSet.universe(space).add_constraint(isl.Constraint.eq_from_names(space, {"i":DummyClass()}))

Reported error:

~/lib/python3.7/site-packages/islpy/_isl.py in set_coefficient_val(self, type, pos, v)
  42540         else:
  42541             raise IslTypeError("v is a %s and cannot "
> 42542                 "be cast to a Val" % type(v))

The function type() is locally overwritten in Constraint.set_coefficient_val.