A python package that implements unweighted and weighted k-means.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

11 lines
247 B

import numpy as np
from .point import Point
def dist(p: Point, q: Point) -> float:
"""
Calculates the Euclidian Distance of a point and another point.
"""
return np.sqrt(pow(q.x - p.x, 2) +
pow(q.y - p.y, 2))