Skip to content

kskyten/Transpilers.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transpilers

Transpilers is a common interface for transpiling code into Julia. It is mainly intended for translating numerical code and wrapping packages and adding multiple dispatch to packages called via PyCall and RCall. However, it aims to be flexible and extensible enough to be used more generally.

Usage

Transpilers exports a single transpile method, which takes the desired format as the first argument and the code to be transpiled as the second argument. Additional options can be given as keyword arguments.

using Transpilers

transpile(Expr, py"1 + 1")

transpile(String, py"lambda x, y: x * y")

open("output.jl", "w") do f
    transpile(f,
    py"""
    import numpy as np

    def foo(x, y):
        x + y * np.dot(x, y)
    """)
end

Backends

https://github.com/kskyten/FromPython.jl https://github.com/kskyten/FromR.jl

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages