ns-dataset / get_full_data.py
LithiumDA
Add Navier-Stokes dataset sample
72abda5
raw
history blame contribute delete
406 Bytes
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}")