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

Type inconsistency/failure to evaluate expressions #511

Open
jamblejoe opened this issue Aug 16, 2022 · 1 comment
Open

Type inconsistency/failure to evaluate expressions #511

jamblejoe opened this issue Aug 16, 2022 · 1 comment

Comments

@jamblejoe
Copy link

related #500

Expressions involving floats seem not to be evaluated, see e.g.

@var x[1:1]
F = System( x.^2; variables=x)
typeof(F([2])) == Vector{Int32}

F = System( 2 * x.^2; variables=x)
typeof(F([2])) == Vector{Int32}

but

F = System( 1. * x.^2; variables=x)
typeof(F([2])) == Vector{Expression}

The same holds for the Jacobian of the system. How do I force evaluation? I am following https://www.juliahomotopycontinuation.org/examples/monte-carlo-integration/ and https://www.juliahomotopycontinuation.org/examples/sampling/ but run into the above issue when evaluating the Jacobian.

@PBrdng
Copy link
Collaborator

PBrdng commented Aug 18, 2022

This is not supposed to happen. We'll fix it (currently discussing how...).

For now, you can use the following code: to_number.(expand.(F([2]))).

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

2 participants