MilesCranmer commited on
Commit
f5a5c8e
1 Parent(s): 07217e1

Fix assertion on csv filenames

Browse files
Files changed (1) hide show
  1. pysr/sr.py +1 -1
pysr/sr.py CHANGED
@@ -2197,7 +2197,7 @@ def run_feature_selection(X, y, select_k_features, random_state=None):
2197
 
2198
  def _csv_filename_to_pkl_filename(csv_filename) -> str:
2199
  # Assume that the csv filename is of the form "foo.csv"
2200
- assert csv_filename.endswith(".csv")
2201
 
2202
  dirname = str(os.path.dirname(csv_filename))
2203
  basename = str(os.path.basename(csv_filename))
 
2197
 
2198
  def _csv_filename_to_pkl_filename(csv_filename) -> str:
2199
  # Assume that the csv filename is of the form "foo.csv"
2200
+ assert str(csv_filename).endswith(".csv")
2201
 
2202
  dirname = str(os.path.dirname(csv_filename))
2203
  basename = str(os.path.basename(csv_filename))