Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-09 07:49:05

0001 #!/usr/bin/env python
0002 
0003 import os, numpy as np
0004 
0005 FOLD = os.path.expandvars("/tmp/$USER/opticks/QSimTest")
0006 
0007 if __name__ == '__main__':
0008     path_ = lambda ver:os.path.join(FOLD, "fill_state_%d" % ver, "state.npy")
0009 
0010     p0 = path_(0)
0011     p1 = path_(1)
0012 
0013     s0 = np.load(p0)
0014     s1 = np.load(p1)
0015 
0016     print("  s0 %s p0 %s " % ( str(s0.shape), p0))
0017     print("  s1 %s p1 %s " % ( str(s1.shape), p1))
0018 
0019     assert np.all( s0.view(np.int32) == s1.view(np.int32) )
0020 
0021     # have to view as int to get the comparison to match as in float get non-comparable nan
0022 
0023 
0024 
0025