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

Converting numpy types to z3 types with RealVal and IntVal #6682

Closed
wijnanduu opened this issue Apr 11, 2023 · 0 comments
Closed

Converting numpy types to z3 types with RealVal and IntVal #6682

wijnanduu opened this issue Apr 11, 2023 · 0 comments

Comments

@wijnanduu
Copy link

It is possible to convert a numpy.float64 instances to a RatNumRef with the RealVal function, but not a numpy.int64 instance to a IntNumRef with IntVal, is this intentional?

More specifically, the following works and produces 6/5:

from z3 import *
import numpy
RealVal(numpy.float64(1.2))

but the following raises a Python value cannot be used as a Z3 integer exception:

from z3 import *
import numpy
IntVal(numpy.int64(1))

Converting a numpy.int64 to a RatNumRef with RealVal does seem to work.

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