Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Counts are sometime sympy integer. #319

Open
permutatriangle-CI opened this issue Feb 7, 2022 · 0 comments
Open

Counts are sometime sympy integer. #319

permutatriangle-CI opened this issue Feb 7, 2022 · 0 comments

Comments

@permutatriangle-CI
Copy link

Some counts end up being sympy integer instead of plain python integer. The script below is an example with a spec. I suspect the issue is in the reverse cartesian.

import requests
from comb_spec_searcher import CombinatorialSpecification

URI = "https://api.combopal.ru.is/garpur_run/61ed03e76e7998290ed176b0"

response = requests.get(URI)
response.raise_for_status()
spec = CombinatorialSpecification.from_dict(response.json()["specification"])
l = list(spec.count_objects_of_size(n) for n in range(15))
for x in l:
    print(type(x), x)

It prints:

<class 'int'> 1
<class 'int'> 1
<class 'int'> 2
<class 'sympy.core.numbers.Integer'> 6
<class 'sympy.core.numbers.Integer'> 24
<class 'sympy.core.numbers.Integer'> 113
<class 'sympy.core.numbers.Integer'> 581
<class 'sympy.core.numbers.Integer'> 3146
<class 'sympy.core.numbers.Integer'> 17633
<class 'sympy.core.numbers.Integer'> 101365
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant