Skip to content

Commit

Permalink
Update de.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Dec 5, 2024
1 parent 0933fbe commit a3deeb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions diffeqpy/de.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a3deeb4

Please sign in to comment.