usearch 0.16.2 → 0.16.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.toml +1 -1
- package/conanfile.py +1 -1
- package/package.json +1 -1
- package/python/usearch/eval.py +11 -1
package/Cargo.toml
CHANGED
package/conanfile.py
CHANGED
|
@@ -4,7 +4,7 @@ from conans import ConanFile
|
|
|
4
4
|
class USearchConan(ConanFile):
|
|
5
5
|
|
|
6
6
|
name = 'USearch'
|
|
7
|
-
version = '0.16.
|
|
7
|
+
version = '0.16.3'
|
|
8
8
|
license = 'Apache 2.0'
|
|
9
9
|
url = 'https://github.com/unum-cloud/usearch'
|
|
10
10
|
description = 'Smaller & Faster Single-File Vector Search Engine from Unum'
|
package/package.json
CHANGED
package/python/usearch/eval.py
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
from time import time_ns
|
|
2
1
|
from typing import Tuple, Any, Callable, Union, Optional, List
|
|
3
2
|
from dataclasses import dataclass, asdict
|
|
4
3
|
from collections import defaultdict
|
|
@@ -9,6 +8,17 @@ from usearch.io import load_matrix
|
|
|
9
8
|
from usearch.index import Index, Matches, MetricKind, MetricKindBitwise
|
|
10
9
|
|
|
11
10
|
|
|
11
|
+
# For compatibility with Python 3.6
|
|
12
|
+
try:
|
|
13
|
+
from time import time_ns
|
|
14
|
+
except ImportError:
|
|
15
|
+
from datetime import datetime
|
|
16
|
+
|
|
17
|
+
def time_ns():
|
|
18
|
+
now = datetime.now()
|
|
19
|
+
return int(now.timestamp() * 1e9)
|
|
20
|
+
|
|
21
|
+
|
|
12
22
|
def random_vectors(
|
|
13
23
|
count: int,
|
|
14
24
|
metric: MetricKind = MetricKind.IP,
|