File size: 464 Bytes
ed552fd | 1 2 3 4 5 6 7 8 9 10 11 | import h5py, sys
path = sys.argv[1] if len(sys.argv) > 1 else r"X:\0Agents-workspace\scholarship\paper2\Exp\data\raw\exp-000\dam_break\traj_0000.h5"
with h5py.File(path, "r") as f:
print(f"Keys: {list(f.keys())}")
for k in f.keys():
d = f[k]
if hasattr(d, "shape"):
print(f" {k}: shape={d.shape}, dtype={d.dtype}, min={d[:].min():.6f}, max={d[:].max():.6f}")
else:
print(f" {k}: {type(d).__name__} = {d}")
|