Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

How to calculate distance without numpy

from math import sqrt

def euclidean_distance(x, y):
    return sqrt(sum((px - py)**2  for px, py in zip(x,y)))
    
euclidean_distance(x,y)
 
PREVIOUS NEXT
Tagged: #How #calculate #distance #numpy
ADD COMMENT
Topic
Name
7+9 =