Skip to content

Commit

Permalink
Added a euclidean_distances.py
Browse files Browse the repository at this point in the history
  • Loading branch information
NelleV committed Jun 27, 2012
1 parent 6e0eb0d commit 9223863
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
Welcome to the SCBC git tutorial data repository !
================================================================================

Something new
9 changes: 9 additions & 0 deletions src/euclidean_distances.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import numpy as np


def euclidean_distances(X, Y):
"""
Compute the euclidean distance
"""
d = ((X - Y) ** 2).sum()
return np.sqrt(d)

0 comments on commit 9223863

Please sign in to comment.