Skip to content

Fix a bug in demo program

Hao Gao requested to merge fix-demo-bug into master

When executing islpy/examples/demo.py, the following error occurs:

Traceback (most recent call last):
  File "demo.py", line 17, in <module>
    bset.union(bset2).convex_hull().foreach_basic_set(bsets_in_union.append)
  File "/home/hao/Develop/islpy/islpy/__init__.py", line 879, in wrapper
    return basic_method(basic_instance, *args, **kwargs)
  File "/home/hao/Develop/islpy/islpy/__init__.py", line 879, in wrapper
    return basic_method(basic_instance, *args, **kwargs)
  File "/home/hao/Develop/islpy/islpy/_isl.py", line 47324, in union
    raise Error("mismatched context in bset2")
islpy._isl.Error: mismatched context in bset2

As the error message suggests, specifying context when constructing "bset2" fixes the issue for me.

Merge request reports

Loading