Back to home page

EIC code displayed by LXR

 
 

    


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

0001 #!/usr/bin/env python
0002 
0003 """
0004 
0005 Note the repetition wraparound::
0006 
0007     t.prd.view(np.int32)[:,:,1,:]
0008     [[[  0   0 100  20]
0009       [  0   0 200  19]
0010       [  0   0 300  29]
0011       [  0   0 400  39]
0012       [  0   0 100  20]
0013       [  0   0 200  19]]
0014 
0015      [[  0   0 100  20]
0016       [  0   0 200  19]
0017       [  0   0 300  29]
0018       [  0   0 400  39]
0019       [  0   0 100  20]
0020       [  0   0 200  19]]
0021 
0022 """
0023 
0024 import numpy as np, textwrap
0025 from opticks.ana.fold import Fold
0026 
0027 if __name__ == '__main__':
0028     t = Fold.Load(symbol="t")
0029     print(repr(t))
0030 
0031     EXPR = list(filter(None,textwrap.dedent(r"""
0032     t.prd.view(np.int32)[:,:,1,:]
0033     """).split("\n")))
0034 
0035     for expr in EXPR:
0036         print(expr)
0037         print(eval(expr))
0038     pass
0039