Skip to content

Commit

Permalink
Override seval to allow multiple expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Feb 9, 2024
1 parent 7c93437 commit d70ae0c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pysr/julia_import.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,11 @@
os.environ[k] = os.environ.get(k, default)

from juliacall import Main as jl # type: ignore


# TODO: Overwrite this once PythonCall.jl is updated:
def seval(s: str):
return jl.eval(jl.Meta.parseall(s))


jl.seval = seval

0 comments on commit d70ae0c

Please sign in to comment.