As shown below:
distances = (((airportPosition - x_vals)**2, axis=1))
airportPosition is a point in the matrix
x_vals are all the points in the matrix
Distances is a matrix of distances from a point to all points.
Above this Python calculate a point to all the points of the Euclidean distance implementation method is all I have shared with you, I hope to give you a reference, and I hope you support me more.