diff --git a/diffeqpy/de.py b/diffeqpy/de.py index 9657f91..77b37d6 100644 --- a/diffeqpy/de.py +++ b/diffeqpy/de.py @@ -2,9 +2,9 @@ from . import load_julia_packages de, _, _ = load_julia_packages("DifferentialEquations", "ModelingToolkit", "PythonCall") from juliacall import Main -de.jit = Main.seval("global jit(x) = typeof(x).name.wrapper(ModelingToolkit.complete(ModelingToolkit.modelingtoolkitize(x); split = false), [], x.tspan)") # kinda hackey +de.jit = Main.seval("(x) -> typeof(x).name.wrapper(ModelingToolkit.complete(ModelingToolkit.modelingtoolkitize(x); split = false), [], x.tspan)") # kinda hackey de.jit32 = Main.seval(""" - global function jit(x) + (x) -> begin prob = typeof(x).name.wrapper(ModelingToolkit.complete(ModelingToolkit.modelingtoolkitize(x); split = false), [], Float32.(x.tspan)) ModelingToolkit.remake(prob; u0 = Float32.(prob.u0), p = Float32.(prob.p)) end