unum-cloud / usearch

Fast Open-Source Search & Clustering engine × for Vectors & 🔜 Strings × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍
https://unum-cloud.github.io/usearch/
Apache License 2.0
2.15k stars 130 forks source link

Bug: #275

Closed ebursztein closed 1 year ago

ebursztein commented 1 year ago

Describe the bug

usearch exact search do not report the keys properly even in the latest version: 2.5.1

Steps to reproduce

test code:

from usearch.index import search, MetricKind, Matches, BatchMatches
import numpy as np

# Generate 10'000 random vectors with 1024 dimensions
vectors = np.random.rand(1000, 64).astype(np.float32)

one_in_many: Matches = search(vectors, vectors[100], 1, MetricKind.Cos, exact=True)
print(one_in_many[0])

print:

Match(key=0, distance=0.0)

Expected behavior

The expected behavior is like the approximate one - we want

Match(key=100, distance=0.0)

USearch version

v2.5.1

Operating System

OSX

Hardware architecture

Arm

Which interface are you using?

Python bindings

Contact Details

happy to reply to comment or send me an email

Is there an existing issue for this?

Code of Conduct

ashvardanian commented 1 year ago

:tada: This issue has been resolved in version 2.6.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: