Commit 2042d0f
committed
docs(embedded): sync metric alias list in type stub, switch argpartition pivot
- _coordinode_embedded.pyi: type stub docstring for `metric` now lists
every accepted alias (cosine/angular, euclidean/l2, dot/dot_product/
ip/inner_product, manhattan/l1). The Rust parser and the constructor
docstring on the Rust side already enumerate the full set; the .pyi
stub had a stale subset.
- tests/unit/test_hnsw.py: brute-force helper now passes `k - 1` as the
argpartition pivot instead of `k`. Both forms yield identical sets
for random gaussian inputs (no ties), but the `k - 1` form matches
the most common Python phrasing of "k smallest via argpartition" and
stops the static-analyzer from flagging the same `k` vs `k - 1`
concern on every review round.1 parent ef485d1 commit 2042d0f
2 files changed
Lines changed: 9 additions & 10 deletions
File tree
- coordinode-embedded/python/coordinode_embedded
- tests/unit
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
25 | 22 | | |
26 | | - | |
| 23 | + | |
27 | 24 | | |
28 | 25 | | |
29 | 26 | | |
| |||
0 commit comments