#  tests for faiss-cpu-1.5.3-py36h04f5b5a_0 (this is a generated file);
print('===== testing package: faiss-cpu-1.5.3-py36h04f5b5a_0 =====');
print('running run_test.py');
#  --- run_test.py (begin) ---
import faiss
import numpy as np

d = 128
# NOTE: BLAS kicks in only when n > distance_compute_blas_threshold = 20
n = 100

rs = np.random.RandomState(1337)
x = rs.rand(n, d).astype(np.float32)

index = faiss.IndexFlatL2(d)
index.add(x)

D, I = index.search(x, 10)
#  --- run_test.py (end) ---

print('===== faiss-cpu-1.5.3-py36h04f5b5a_0 OK =====');
