MCPcopy Create free account
hub / github.com/VectorDB-NTU/RaBitQ-Library / read_ivecs

Function read_ivecs

sample/python/utils.py:10–15  ·  view source on GitHub ↗
(filename: str)

Source from the content-addressed store, hash-verified

8# ──────────────────────────────────────────────
9
10def read_ivecs(filename: str) -> np.ndarray:
11 print(f"Reading File - {filename}")
12 a = np.fromfile(filename, dtype="int32")
13 d = a[0]
14 print(f"\t{filename} read, dim={d}")
15 return a.reshape(-1, d + 1)[:, 1:]
16
17
18def read_fvecs(filename: str) -> np.ndarray:

Callers 4

mainFunction · 0.90
mainFunction · 0.90
mainFunction · 0.90
read_fvecsFunction · 0.70

Calls 1

printFunction · 0.50

Tested by

no test coverage detected