rougier/numpy-100

#52 question

radmir20 opened this issue · 1 comments

Instead D = np.sqrt( (x-x.T)**2 + (y-y.T)**2), you can use: D = np.hypot(x-x.T, y-y.T). I think it should be faster

Thanks. hypot is actually slower for large vectors (at least on my machine).