how to calculate distance between every two points in a numpy array code example Example: numpy euclidean distance dist = numpy.linalg.norm(a-b)