Skip to content

Commit

Permalink
Only print set_diff if has contents
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Nov 21, 2022
1 parent 4300bea commit b4abede
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pysr/julia_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,12 @@ def init_julia(julia_project=None, quiet=False, julia_kwargs=None):
set_diff = new_set - init_set
# Remove the `compiled_modules` key, since it is not a user-specified kwarg:
set_diff = {k: v for k, v in set_diff if k != "compiled_modules"}
warnings.warn(
"Julia has already started. The new Julia options "
+ str(set_diff)
+ " will be ignored."
)
if len(set_diff) > 0:
warnings.warn(
"Julia has already started. The new Julia options "
+ str(set_diff)
+ " will be ignored."
)

if julia_initialized:
Main.eval("using Pkg")
Expand Down

0 comments on commit b4abede

Please sign in to comment.