Skip to content

Commit

Permalink
Fix multi-output index selection
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Apr 26, 2022
1 parent 20cc2d4 commit c4f15ef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pysr/sr.py
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ def get_best(self, index=None):
if index is not None:
if isinstance(self.equations, list):
assert isinstance(index, list)
return [self.equations.iloc[i] for i in index]
return [eq.iloc[i] for eq, i in zip(self.equations, index)]
return self.equations.iloc[index]

if self.model_selection == "accuracy":
Expand Down

0 comments on commit c4f15ef

Please sign in to comment.