Computational Thinking, Linear Algebra, Linear Regression, Python, Jupyter Notebook.
z return zz nobs = 10000 x = np.random.randn(nobs).astype('float32') y = np.random.randn(nobs).astype('float32') %timeit proc_python(x,y) # Untyped and unvectorized 49.8 ms ± 1.19 ms per loop (mean ± std. dev. of 7 runs, 10 loops each) Numpy Numpy lets us vectorize this: # Typed and Vectorized def