@@ -158,7 +158,7 @@ def airline_ohe(dataset_dir: Path) -> bool:
158
158
X = df .drop ('dep_delayed_15min' , 1 )
159
159
y = df ["dep_delayed_15min" ]
160
160
161
- y_num = np .where (y == "Y" , 1 , 0 )
161
+ y_num = np .where (( y == "Y" ). tolist () , 1 , 0 )
162
162
163
163
sets .append (X )
164
164
labels .append (y_num )
@@ -382,7 +382,7 @@ def gisette(dataset_dir: Path) -> bool:
382
382
num_train = 6000
383
383
x_train_arr = df_train .iloc [:num_train ].values
384
384
x_train = pd .DataFrame (np .array ([np .fromstring (
385
- elem [0 ], dtype = int , count = num_cols , sep = ' ' ) for elem in x_train_arr ]))
385
+ elem [0 ], dtype = int , count = num_cols , sep = ' ' ). tolist () for elem in x_train_arr ]))
386
386
y_train_arr = df_labels .iloc [:num_train ].values
387
387
y_train = pd .DataFrame ((y_train_arr > 0 ).astype (int ))
388
388
@@ -393,7 +393,7 @@ def gisette(dataset_dir: Path) -> bool:
393
393
x_test = pd .DataFrame (np .array (
394
394
[np .fromstring (
395
395
elem [0 ],
396
- dtype = int , count = num_cols , sep = ' ' )
396
+ dtype = int , count = num_cols , sep = ' ' ). tolist ()
397
397
for elem in x_test_arr ]))
398
398
y_test_arr = df_labels .iloc [:num_train ].values
399
399
y_test = pd .DataFrame ((y_test_arr > 0 ).astype (int ))
0 commit comments