From 0b415fa8ccb6995a9f311914d200fba2653b5bf3 Mon Sep 17 00:00:00 2001 From: Christopher Rackauckas Date: Thu, 5 Dec 2024 14:52:42 -0700 Subject: [PATCH] Update de.py --- diffeqpy/de.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/diffeqpy/de.py b/diffeqpy/de.py index 5bd1ae2..9657f91 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("jit(x) = typeof(x).name.wrapper(ModelingToolkit.complete(ModelingToolkit.modelingtoolkitize(x); split = false), [], x.tspan)") # kinda hackey +de.jit = Main.seval("global jit(x) = typeof(x).name.wrapper(ModelingToolkit.complete(ModelingToolkit.modelingtoolkitize(x); split = false), [], x.tspan)") # kinda hackey de.jit32 = Main.seval(""" - function jit(x) + global function jit(x) 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