1

I recently started working with diffeqpy to solve differential equations, after installation i used this example from the page main https://github.com/SciML/diffeqpy :

from diffeqpy import de
import time
import matplotlib.pyplot as plt

t0 = time.time()
def f(u,p,t):
    return -u

u0 = 0.5
tspan = (0., 1.)
prob = de.ODEProblem(f, u0, tspan)
sol = de.solve(prob)

print(time.time()-t0)

plt.plot(sol.t,sol.u)
plt.show()

It takes me 8 seconds to compute the solution of this simple equation, is there something wrong?

Edit: I am using Julia 1.5.3, python 3.7.4, diffeqpy 1.1.0 and julia(python) 0.5.6

Victor
  • 398
  • 1
  • 2
  • 11
  • 1
    What version of Julia are you using? Also, what are you timing? – Oscar Smith Feb 12 '21 at 18:30
  • 3
    As mentioned in [this video](https://youtu.be/Jf2VUGaPL4k), diffeqpy has a few remaining problems related to the Python integration still that need to be fixed up. You're seeing this + JIT time. That's not much of a StackOverflow question as it's just a comment about an in-development library. – Chris Rackauckas Feb 12 '21 at 19:00
  • 1
    Thanks for the quick answer, I added the details of the version. @ChrisRackauckas I saw your previous answers [here](https://stackoverflow.com/q/47501844/5372398) and [here](https://stackoverflow.com/questions/44890124/why-couldnt-julia-superset-python/44890542#44890542) and understood after the first call it compiles and goes extremelly fast, so problem solved, also thanks for pointing out the video, I appreciate your effort in this project and was asking just to now if I was doing something wrong. – Victor Feb 12 '21 at 21:35

0 Answers0