Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
61138f4
1
Parent(s):
4383f88
Fix useless elif statement
Browse files- pysr/sr.py +1 -2
pysr/sr.py
CHANGED
@@ -491,7 +491,6 @@ def _create_julia_files(
|
|
491 |
hyperparam_filename,
|
492 |
def_hyperparams,
|
493 |
niterations,
|
494 |
-
npop,
|
495 |
runfile_filename,
|
496 |
julia_project,
|
497 |
procs,
|
@@ -748,7 +747,7 @@ def _handle_constraints(binary_operators, constraints, unary_operators, **kwargs
|
|
748 |
# Make sure the complex expression is in the left side.
|
749 |
if constraints[op][0] == -1:
|
750 |
continue
|
751 |
-
|
752 |
constraints[op][0], constraints[op][1] = (
|
753 |
constraints[op][1],
|
754 |
constraints[op][0],
|
|
|
491 |
hyperparam_filename,
|
492 |
def_hyperparams,
|
493 |
niterations,
|
|
|
494 |
runfile_filename,
|
495 |
julia_project,
|
496 |
procs,
|
|
|
747 |
# Make sure the complex expression is in the left side.
|
748 |
if constraints[op][0] == -1:
|
749 |
continue
|
750 |
+
if constraints[op][1] == -1 or constraints[op][0] < constraints[op][1]:
|
751 |
constraints[op][0], constraints[op][1] = (
|
752 |
constraints[op][1],
|
753 |
constraints[op][0],
|