Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

R, Python, and MATLAB Wrappers #284

Closed
ChrisRackauckas opened this issue Apr 19, 2018 · 5 comments
Closed

R, Python, and MATLAB Wrappers #284

ChrisRackauckas opened this issue Apr 19, 2018 · 5 comments

Comments

@ChrisRackauckas
Copy link
Member

I think we are at a good spot to start considering how we can make DifferentialEquations.jl usable from R, Python, and MATLAB. For R, JuliaCall is quite well developed, with an example package for IPOPT and a JuliaCall example from Douglas Bates. This might be a good start.

Python has pyjulia which I am unsure about. MATLAB has mexjulia.

I think a good goal would be to expose basic ODEs, SDEs, DDEs, and DAEs for those languages. That would give a solid unique offering at each place to establish some ground and then use the knowledge of these tools to see what's feasible.

@ChrisRackauckas
Copy link
Member Author

diffeqr is a set of R wrappers. JuliaCall is amazing and that was easy to create.

@ChrisRackauckas
Copy link
Member Author

I'm running into some issues with pyjulia. Some starter code is here: JuliaPy/PyCall.jl#460 . The issues are:

How do deal with the solution object returns? We can just ignore the problem completely like diffeqr and just return t,u, or try to return an appropriate object ( JuliaPy/PyCall.jl#460 ).

How do we make function calls fast? In diffeqr we just had them write Julia code. I'm not sure how to do the same with pyjulia (JuliaPy/pyjulia#154), and I'm not sure how to interface with something else like Cython.

In a sense something is working:

from julia import Julia

jul = Julia()
jul.using("DifferentialEquations")

def f(u,p,t):
    return -u

u0 = 0.5
tspan = (0., 1.)
prob = jul.ODEProblem(f, u0, tspan)
jul.using("PyCall")
jul.using("DiffEqBase")
solve = jul.pyfunctionret(jul.solve, jul.Any, jul.PyAny)
solve(prob)

@ChrisRackauckas
Copy link
Member Author

mexjulia is crashing: juliamatlab/mexjulia#58

@ChrisRackauckas
Copy link
Member Author

diffeqpy works. It has almost a full interface. Needs some finishing touches. It uses DiffEqPy.jl under the hood to get the job done.

@ChrisRackauckas
Copy link
Member Author

Looks like there's reports of mexjulia being almost unusable right now: juliamatlab/mexjulia#32 . We'll just not do MATLAB until a better solution comes along.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant