Re:Making Python 100x faster with less than 100 lines of Rust
by brahbrah on Thursday March 30, 2023 @07:35AM
(#35371094)
Yea 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)
Thanks!