MilesCranmer commited on
Commit
4803d41
·
unverified ·
1 Parent(s): 3bcbc49

Fix PythonCall issue of not converting `np.str_` to `String`

Browse files
Files changed (1) hide show
  1. pysr/sr.py +4 -2
pysr/sr.py CHANGED
@@ -1732,8 +1732,10 @@ class PySRRegressor(MultiOutputMixin, RegressorMixin, BaseEstimator):
1732
  jl_y,
1733
  weights=jl_weights,
1734
  niterations=int(self.niterations),
1735
- variable_names=jl_array(self.feature_names_in_.tolist()),
1736
- display_variable_names=jl_array(self.display_feature_names_in_.tolist()),
 
 
1737
  y_variable_names=jl_y_variable_names,
1738
  X_units=jl_array(self.X_units_),
1739
  y_units=jl_array(self.y_units_),
 
1732
  jl_y,
1733
  weights=jl_weights,
1734
  niterations=int(self.niterations),
1735
+ variable_names=jl_array([str(v) for v in self.feature_names_in_]),
1736
+ display_variable_names=jl_array(
1737
+ [str(v) for v in self.display_feature_names_in_]
1738
+ ),
1739
  y_variable_names=jl_y_variable_names,
1740
  X_units=jl_array(self.X_units_),
1741
  y_units=jl_array(self.y_units_),