Skip to content

Instantly share code, notes, and snippets.

@saurbhc
Last active October 2, 2021 21:21
Show Gist options
  • Save saurbhc/f324fc23ee28828856538ee39baf1ef3 to your computer and use it in GitHub Desktop.
Save saurbhc/f324fc23ee28828856538ee39baf1ef3 to your computer and use it in GitHub Desktop.
Euclidean Distance
def compute_euclidean_distance(self):
return math.sqrt(
sum(
[(i - j) ** 2 for i, j in zip(self.from_vector_list, self.to_vector_list)]
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment