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 f544004 commit 0b415fa
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("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
Expand Down

0 comments on commit 0b415fa

Please sign in to comment.