I have two arrays like
a == array([[x0, y0], [x1, y1], ... ,[xn, yn]])
b == array([[u0, v0], [u1, v1], ... ,[un, vn]])
e.g. for (x0, y0)
in a
, I need to find its closest correspondent (e.g. based on Euclidean distance) on b
, and I need to do this for all elements in a
. What's the fastest way in python?