diff --git a/diffeqpy/de.py b/diffeqpy/de.py index 9657f91..22a1d41 100644 --- a/diffeqpy/de.py +++ b/diffeqpy/de.py @@ -2,11 +2,11 @@ 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.jit32 = Main.seval(""" - 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)) +de.seval("jit(x) = typeof(x).name.wrapper(Main.ModelingToolkit.complete(Main.ModelingToolkit.modelingtoolkitize(x); split = false), [], x.tspan)") # kinda hackey +de.seval(""" + function jit(x) + prob = typeof(x).name.wrapper(Main.ModelingToolkit.complete(Main.ModelingToolkit.modelingtoolkitize(x); split = false), [], Float32.(x.tspan)) + Main.ModelingToolkit.remake(prob; u0 = Float32.(prob.u0), p = Float32.(prob.p)) end """) # kinda hackey sys.modules[__name__] = de # mutate myself diff --git a/setup.py b/setup.py index dca81db..86c0a88 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ def readme(): return f.read() setup(name='diffeqpy', - version='2.5.2', + version='2.5.3', description='Solving Differential Equations in Python', long_description=readme(), long_description_content_type="text/markdown",