Skip to content

Commit 524dfec

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 553f8ef commit 524dfec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

machine_learning/approx_nearest_neighbours.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@
1616
1. The nearest (approximate) vector.
1717
2. Its distance from the query vector.
1818
"""
19+
1920
from __future__ import annotations
2021

2122
import math
2223
from collections import defaultdict
2324

2425
import numpy as np
26+
27+
2528
def euclidean(input_a: np.ndarray, input_b: np.ndarray) -> float:
2629
"""
2730
Calculates Euclidean distance between two vectors.
@@ -114,5 +117,5 @@ def query(self, query_vectors: np.ndarray) -> list[list[list[float] | float]]:
114117

115118
if __name__ == "__main__":
116119
import doctest
117-
doctest.testmod()
118120

121+
doctest.testmod()

0 commit comments

Comments
 (0)