Skip to content

Support pyconvert #26

@LilithHafner

Description

@LilithHafner

I'm trying to convert SymPy expressions to ModelingToolkit.jl expressions, converting SymPy expressions to Julia Exprs would be a great first step.

julia> f = pyeval("sympy.core.sympify", Main)
Python: <function sympify at 0x16c71cd60>

julia> expr = f("a + b ** 3")
Python: a + b**3

julia> pyconvert(Any, expr)
:(a + b ^ 3)     # Wanted
Python: a + b**3 # Actual

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions