MilesCranmer commited on
Commit
c4f15ef
·
1 Parent(s): 20cc2d4

Fix multi-output index selection

Browse files
Files changed (1) hide show
  1. pysr/sr.py +1 -1
pysr/sr.py CHANGED
@@ -795,7 +795,7 @@ class PySRRegressor(BaseEstimator, RegressorMixin):
795
  if index is not None:
796
  if isinstance(self.equations, list):
797
  assert isinstance(index, list)
798
- return [self.equations.iloc[i] for i in index]
799
  return self.equations.iloc[index]
800
 
801
  if self.model_selection == "accuracy":
 
795
  if index is not None:
796
  if isinstance(self.equations, list):
797
  assert isinstance(index, list)
798
+ return [eq.iloc[i] for eq, i in zip(self.equations, index)]
799
  return self.equations.iloc[index]
800
 
801
  if self.model_selection == "accuracy":