Skip to content

Commit

Permalink
Fix bug with inplace editing of equation_file_contents_
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Aug 4, 2022
1 parent b8a97f1 commit a6bed2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pysr/sr.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
import os
import sys
import numpy as np
Expand Down Expand Up @@ -1928,7 +1929,9 @@ def get_hof(self):

ret_outputs = []

for output in self.equation_file_contents_:
equation_file_contents = copy.deepcopy(self.equation_file_contents_)

for output in equation_file_contents:

scores = []
lastMSE = None
Expand Down

0 comments on commit a6bed2c

Please sign in to comment.