Commit 4e19ab4c authored by Ngan Thi Dong's avatar Ngan Thi Dong
Browse files


parent 5fba93df
......@@ -100,7 +100,9 @@ def gen_fold(data_dir, save_dir, numFold=5, negative_rate=1.0, randomseed=123):
save2File(test_pair_lbl, saving_prefix + 'test_lbl.csv')
def save2File(input, out_path):
df = pd.DataFrame(np.array(input) if type(input) == list else input)
if str(type(input)).find('ndarray') < 0:
input = np.array(input)
df = pd.DataFrame(input)
df.to_csv(out_path, header=False, index=False)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment