add
API Definition
def add(nb:int, xb: numpy.ndarray, consecutive: int, reorder: int, level: int) -> int
Function
Builds a graph index.
Parameters
Parameter |
Data Type |
Description |
Value Range |
|---|---|---|---|
nb |
int |
Data volume of the vector base library. |
≥ 1. It is recommended that the value be less than 1 billion. |
xb |
numpy.ndarray |
Data of the vector base library. |
The value cannot be null. The expected length is nb × dim (Data volume × Feature dimension). |
consecutive |
int |
Block size. |
[1, 31] |
reorder |
int |
Indicates whether to enable base library vector reordering. |
0 or 1. |
level |
int |
Quantization level. |
[0, 3]
|
Return Value
Data Type |
Description |
|---|---|
int |
This API is a wrapper for an underlying C++ API, which controls exception handling. |
Parent topic: Python