HomotopyContinuation.jl
                                
                                
                                
                                    HomotopyContinuation.jl copied to clipboard
                            
                            
                            
                        Type inconsistency/failure to evaluate expressions
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.
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]))).