Skip to content

Commit

Permalink
2.5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Dec 5, 2024
1 parent 24c3e97 commit 657f2f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions diffeqpy/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 657f2f6

Please sign in to comment.