From f7cb0a65ef7a6e5cf1ad318ca8514abef74771bd Mon Sep 17 00:00:00 2001 From: Jared Van Bortel Date: Wed, 13 Dec 2023 17:55:41 -0500 Subject: [PATCH] remove script with unclear purpose --- undump.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100755 undump.py diff --git a/undump.py b/undump.py deleted file mode 100755 index c3d8993be..000000000 --- a/undump.py +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env python3 -import struct -import numpy as np -from pathlib import Path - -def undump(fn): - with open(fn, 'rb') as df: - dims = struct.unpack('=QQQQ', df.read(8*4)) - (dsz,) = struct.unpack('=Q', df.read(8)) - ## assume f32 - data = df.read(dsz) - data = [i for (i,) in struct.iter_unpack('=f', data)] - return np.array(data).reshape(dims).squeeze() - -if __name__ == '__main__': - for dfn in sorted(Path('.').glob('*.dump')): - darr = undump(dfn) - print(f'{dfn}: {darr.shape}\n{darr}') -