File indexing completed on 2026-04-09 07:49:13
0001
0002
0003 import numpy as np
0004
0005
0006 if __name__ == '__main__':
0007
0008 dir_ = "/tmp"
0009 apath = os.path.join(dir_, "a.npy")
0010 bpath = os.path.join(dir_, "b.npy")
0011
0012 if not os.path.exists(apath):
0013 a = np.random.sample(1024).astype(np.float32)
0014 print("Creating random sample a %s saved to %s " % (str(a.shape), apath))
0015 np.save(apath, a )
0016 else:
0017 a = np.load(apath)
0018 b = np.load(bpath)
0019 print("Loaded a %s from %s " % (str(a.shape), apath))
0020 print("Loaded b %s from %s " % (str(b.shape), bpath))
0021 pass
0022 pass
0023
0024
0025
0026
0027
0028