---------------------------------------------------------------------------

points = np.array([[1, 1], [2, 2], [3, 1], [1000, 1000]])
p = np.array([[800, 300]])
d = points - p
sd = np.square(d)
dists = sd.sum(axis=1)
dist = np.sqrt(dists)
dist.argmin()

---------------------------------------------------------------------------



---------------------------------------------------------------------------



---------------------------------------------------------------------------




---------------------------------------------------------------------------




---------------------------------------------------------------------------




---------------------------------------------------------------------------




---------------------------------------------------------------------------




---------------------------------------------------------------------------




---------------------------------------------------------------------------