Definition at line 140 of file general_optics.py. 00140 : 00141 "expand x to ((x,0),(0,x)), (x,y) to ((x,0),(0,y)), ((x,t),(z,t)) to itself" 00142 a=Numeric.array(object) 00143 if a.shape==(): 00144 return a[0]*Numeric.identity(2) 00145 elif a.shape==(2,): 00146 return Numeric.array(((a[0],0),(0,a[1]))) 00147 else: 00148 return a 00149 00150 class qtens:
|