You are on the right track with using Numpy for this. I personally found Numpy very unintuitive when I first used it, but it gets (a little) easier with practice.
The basic idea is that you want to avoid loops and use vectorized operations. This allows much faster operations on large data structures.
On part of vectorization is broadcasting — where Numpy can apply operations over differently shaped objects. So in this case you can subtract without looping:
import numpy as np
starting_point = np.array([1.0, 2.0])
list_of_points = np.array([[4, 6], [5, 5], [3, 2]])
# subtract starting_point from each point in list_of_points
dif = list_of_points - starting_point
If you dig around in the docs you'll find all sorts of vectorized operations including np.linalg.norm()
(docs) which calculates different kinds of norms including distances. The trick to using this is to figure out which axis to use. I've changes the values to make it easy to confirm the correct answers:
import numpy as np
starting_point = np.array([1.0, 2.0])
list_of_points = np.array([[4, 6], [5, 5], [3, 2]])
np.linalg.norm(starting_point - list_of_points, axis=1)
# array([ 5., 5., 2.])
You can also do it the hard way by squaring, summing and taking the square root if you want to:
np.sqrt(
np.sum(
np.square(list_of_points - starting_point),
axis = 1)
)
# array([ 5., 5., 2.])