Spaces:
Running
Running
Commit
·
07217e1
1
Parent(s):
34f4e3f
Add assertion for csv filename
Browse files- pysr/sr.py +2 -0
pysr/sr.py
CHANGED
|
@@ -2197,6 +2197,8 @@ 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 |
dirname = str(os.path.dirname(csv_filename))
|
| 2201 |
basename = str(os.path.basename(csv_filename))
|
| 2202 |
base = str(os.path.splitext(basename)[0])
|
|
|
|
| 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))
|
| 2204 |
base = str(os.path.splitext(basename)[0])
|