/ Published in: Python
Expand |
Embed | Plain Text
def euclidean(x,y): sumSq=0.0 #add up the squared differences for i in range(len(x)): sumSq+=(x[i]-y[i])**2 #take the square root of the result return (sumSq**0.5)
You need to login to post a comment.
