Skip to content

Commit a810f27

Browse files
committed
Updated example [skip ci]
1 parent 45b054c commit a810f27

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

examples/citus/example.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import numpy as np
2+
from pgvector import Vector
23
from pgvector.psycopg import register_vector
34
import psycopg
45

@@ -38,7 +39,7 @@
3839
copy.set_types(['vector', 'bigint'])
3940

4041
for i in range(rows):
41-
copy.write_row([embeddings[i], categories[i]])
42+
copy.write_row([Vector(embeddings[i]), categories[i]])
4243

4344
print('Creating index in parallel')
4445
conn.execute('CREATE INDEX ON items USING hnsw (embedding vector_l2_ops)')

0 commit comments

Comments
 (0)