Skip to content

Instantly share code, notes, and snippets.

Last active Apr 28, 2020
What would you like to do?
from scipy.spatial import distance
def compute_distance(midpoints,num):
dist = np.zeros((num,num))
for i in range(num):
for j in range(i+1,num):
if i!=j:
dst = distance.euclidean(midpoints[i], midpoints[j])
return dist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment