Computational Thinking, Linear Algebra, Linear Regression, Python, Jupyter Notebook.
for i in range(M): for j in range(M): d = 0.0 for k in range(N): tmp = X[i, k] - X[j, k] d += tmp * tmp D[i, j] = np.sqrt(d) I should emphasize that this is the exact same code, except for numba’s jit decorator. The results are pretty astonishing: X = np.random.random((1000, 3)) D = np.empty((1000,