-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Open
Description
I am running the code below on Colab. But getting the error in index that ValueError: input not a numpy array
Anyone helps? thanks.
import faiss
dim = embeds.shape[1]
index = faiss.IndexFlatL2(dim)
index.add(np.float32(embeds))
ValueError Traceback (most recent call last)
in <cell line: 0>()
3 dim = embeds.shape[1]
4 index = faiss.IndexFlatL2(dim)
----> 5 index.add(np.float32(embeds))
1 frames
/usr/local/lib/python3.11/dist-packages/faiss/swigfaiss_avx512.py in swig_ptr(a)
11448
11449 def swig_ptr(a):
11450 return _swigfaiss_avx512.swig_ptr(a)
11451
11452 def rev_swig_ptr(*args):
ValueError: input not a numpy array
tunaozates
Metadata
Metadata
Assignees
Labels
No labels