3 ms·
Totally out of curiosity, could you be a bit more concrete in your posted example? I can't get it to work (I'm inexperienced with numpy and I'm messing somethin
by tecleandor 4y ago
Totally out of curiosity, could you be a bit more concrete in your posted example? I can't get it to work (I'm inexperienced with numpy and I'm messing something when translating your quick example to python)
Thanks!
- brahbrah 4y agoYea sorry that was just pseudo code. You want it in this form: centers = np.array([ [3, 3], [4, 4] ]) point = np.array([3.5, 3.5]) vals = centers - point np.linalg.norm(vals, axis=1)