Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
d70ae0c
1
Parent(s):
7c93437
Override seval to allow multiple expressions
Browse files- pysr/julia_import.py +8 -0
pysr/julia_import.py
CHANGED
@@ -30,3 +30,11 @@ for k, default in (
|
|
30 |
os.environ[k] = os.environ.get(k, default)
|
31 |
|
32 |
from juliacall import Main as jl # type: ignore
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
30 |
os.environ[k] = os.environ.get(k, default)
|
31 |
|
32 |
from juliacall import Main as jl # type: ignore
|
33 |
+
|
34 |
+
|
35 |
+
# TODO: Overwrite this once PythonCall.jl is updated:
|
36 |
+
def seval(s: str):
|
37 |
+
return jl.eval(jl.Meta.parseall(s))
|
38 |
+
|
39 |
+
|
40 |
+
jl.seval = seval
|