Skip to content

Instantly share code, notes, and snippets.

@michaelChein
Last active February 12, 2019 22:05
Show Gist options
  • Save michaelChein/05cd582462193233553d383ecce2938c to your computer and use it in GitHub Desktop.
Save michaelChein/05cd582462193233553d383ecce2938c to your computer and use it in GitHub Desktop.
Euclidean code for medium
result = []
for i,_ in enumerate(data):
for j,_ in enumerate(data):
result[i,j] = np.sqrt(np.sum((data[i,:]-data[j,:])**2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment