Skip to content
Snippets Groups Projects
Commit a91caf43 authored by Radek Hušek's avatar Radek Hušek
Browse files

Ensure that .eval(CircuitDoubleCover) returns integer

parent a68f602e
No related branches found
No related tags found
No related merge requests found
......@@ -294,7 +294,11 @@ def _init_():
assert len(b) <= 1
if len(b) == 0: return 0
assert b[0].boundary == (None,)
return b[0].value
ret = b[0].value
if isinstance(ret, Fraction):
assert ret.denominator == 1
ret = ret.numerator
return ret
def enumerate_boundaries(self, n):
"""Enumerate all possible boundaries on cut of size `n`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment