mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Upgrade to Python 3.13 (#11588)
This commit is contained in:
@ -42,7 +42,7 @@ class KNN:
|
||||
>>> KNN._euclidean_distance(np.array([1, 2, 3]), np.array([1, 8, 11]))
|
||||
10.0
|
||||
"""
|
||||
return np.linalg.norm(a - b)
|
||||
return float(np.linalg.norm(a - b))
|
||||
|
||||
def classify(self, pred_point: np.ndarray[float], k: int = 5) -> str:
|
||||
"""
|
||||
|
Reference in New Issue
Block a user