Skip to content

Commit 003422b

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 0ab81c1 commit 003422b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

machine_learning/k_nearest_neighbours.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,11 @@ def classify(self, pred_point: np.ndarray[float], k: int = 5) -> str:
131131
"""
132132
# Choose the distance function once
133133
if self.distance_metric == "euclidean":
134+
134135
def dist_fn(a: np.ndarray[float]) -> float:
135136
return self._euclidean_distance(a, pred_point)
136137
elif self.distance_metric == "manhattan":
138+
137139
def dist_fn(a: np.ndarray[float]) -> float:
138140
return self._manhattan_distance(a, pred_point)
139141
else: # minkowski

0 commit comments

Comments
 (0)