Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do i pass in np.ndarray with ndim > 1 #8

Closed
pzerone opened this issue Apr 14, 2023 · 2 comments
Closed

How do i pass in np.ndarray with ndim > 1 #8

pzerone opened this issue Apr 14, 2023 · 2 comments

Comments

@pzerone
Copy link

pzerone commented Apr 14, 2023

I'm working on a project based of face recognition where i have to store the face-embedding into postgres DB. the face-recog part returns a numpy nd-array with 120 dimensions. which is the cropped out portion of the face. When i try to store this, pgvector complains that ndim needs to be 1. I cannot find any relevent documentation regarding this. How do i change it? wny help would be appreciated

@ankane
Copy link
Member

ankane commented Apr 14, 2023

Hi @pzerone, it sounds like you're trying to pass a matrix to a vector column. If you have multiple embeddings, you'll typically want to store them as multiple rows.

@pzerone
Copy link
Author

pzerone commented Apr 17, 2023

Hey @ankane. Thanks for the heads up. Now it makes sense. I was infact trying to pass in a matrix. Thank you for your help.

@pzerone pzerone closed this as completed Apr 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants