Lines Matching refs:np
27 import numpy as np namespace
62 f = np.array([-1, 1]).astype('float32')
65 f = np.convolve(f, f)
66 f = np.convolve(f, f)
84 f /= math.sqrt(np.dot(f, f))
176 np.mean(tile(p, tile_size), axis=(0, 1)).flatten()
178 np.var(tile(hp, tile_size), axis=(0, 1)).flatten()
238 sens = np.asarray([e[0] for e in measured_models[pidx]])
239 sens_sq = np.square(sens)
242 gains = np.asarray([s[0] for s in samples[pidx]])
243 means = np.asarray([s[1] for s in samples[pidx]])
244 vars_ = np.asarray([s[2] for s in samples[pidx]])
249 digital_gains = np.maximum(gains/sens_max_analog, 1)
258 a = np.asarray([ad, bd, cd, dd]).T
263 a /= (np.tile(gains, (a.shape[1], 1)).T)
266 [A_p, B_p, C_p, D_p], _, _, _ = np.linalg.lstsq(a, b)
276 C_p*sens_sq + D_p*np.square(np.maximum(sens/sens_max_analog, 1))