Lines Matching refs:np

2 import numpy as np  namespace
7 import numpy as np namespace
10 return(np.round(1.0*x * (1<<31)))
13 return(np.round(1.0*x * (1<<15)))
16 return(np.round(1.0*x * (1<<7)))
81 vals=np.linspace(np.float_power(2,-15),1.0,num=125)
83 vals=np.linspace(np.float_power(2,-10),1.0,num=125)
85 vals=np.linspace(np.float_power(2,-31),1.0,num=125)
88 ref=np.log(vals)
106 a1=np.array([0,math.pi/4,math.pi/2,3*math.pi/4,math.pi,5*math.pi/4,3*math.pi/2,2*math.pi-1e-6])
107 …a2=np.array([-math.pi/4,-math.pi/2,-3*math.pi/4,-math.pi,-5*math.pi/4,-3*math.pi/2,-2*math.pi-1e-6…
109 angles=np.concatenate((a1,a2,a3))
110 refcos = np.cos(angles)
111 refsin = np.sin(angles)
114 vals=np.linspace(0.0,1.0,1024)
115 sqrtvals=np.sqrt(vals)
122 angles=np.concatenate((a1,a2,a1))
134 samples=np.random.randn(NBSAMPLES)
135 samples = np.abs(Tools.normalize(samples))
138 numerator=np.linspace(-0.9,0.9)
139 numerator=np.hstack([numerator,np.array([-1.0,1.0])])
140 denominator=np.linspace(-0.9,0.9)
141 denominator=np.hstack([denominator,np.array([-1.0,1.0])])
167 angles=np.linspace(0.0,2*math.pi,1000,endpoint=True)
168 angles=np.hstack([angles,np.array([math.pi/4.0])])
172 radius=np.linspace(0.1,0.9,10,endpoint=True)
177 x = r*np.cos(angle)
178 y = r*np.sin(angle)
179 res.append(np.arctan2(y,x))
184 config.writeInput(1, np.array(yx).flatten(),"Atan2Input")
188 config.writeReference(1, np.array(res)/4.0,"Atan2Ref")
190 config.writeReference(1, np.array(res),"Atan2Ref")
197 theInput=np.array([1.0-1e-6,0.6,0.5,0.3,0.25,0.1,1.0/(1<<31)])
200 theInput=np.array([1.0-1e-6,0.6,0.5,0.3,0.25,0.1,1.0/(1<<15)])
203 shiftAndScaled=np.array([normalizeToOne(x) for x in ref]).transpose()
204 shiftValues=shiftAndScaled[0].astype(np.int16)
209 config.writeInput(1, np.array(theInput),"RecipInput")
247 config.writeInputU64(1,np.array(theInput),"Norm64To32_Input")
269 allCombinations=np.array(allCombinations,dtype=np.int64).flatten()
281 data1 = np.random.randn(20)
282 data1 = np.abs(data1)
287 samples=np.concatenate((np.array([0.0,1.0]),np.linspace(-0.4,0.4)))
289 v = np.exp(samples)
293 samples=np.random.randn(NBSAMPLES)
294 samples = np.abs(Tools.normalize(samples))