File size: 406 Bytes
72abda5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
import os
import numpy as np
input_dir = "./ns_split_3"
output_path = "./NS-Re500_T300_id0.npy"
part_files = sorted([
os.path.join(input_dir, f) for f in os.listdir(input_dir)
if f.endswith(".npy") and f.startswith("ns_part_")
])
arrays = [np.load(path) for path in part_files]
merged = np.concatenate(arrays, axis=0)
np.save(output_path, merged)
print(f"Merged file saved to: {output_path}")
|