Spaces:
Running
Running
MilesCranmer
commited on
Commit
•
546ea43
1
Parent(s):
81ba2f3
Only preprocess floats if given string
Browse files- pysr/sr.py +5 -1
pysr/sr.py
CHANGED
@@ -2355,4 +2355,8 @@ _apply_regexp_sci = lambda x: _regexp_sci.sub(r"\1e\2", x)
|
|
2355 |
|
2356 |
|
2357 |
def _preprocess_julia_floats(s: str) -> str:
|
2358 |
-
|
|
|
|
|
|
|
|
|
|
2355 |
|
2356 |
|
2357 |
def _preprocess_julia_floats(s: str) -> str:
|
2358 |
+
if isinstance(s, str):
|
2359 |
+
s = _apply_regexp_im(s)
|
2360 |
+
s = _apply_regexp_im_sci(s)
|
2361 |
+
s = _apply_regexp_sci(s)
|
2362 |
+
return s
|