Skip to content

Commit b4287d5

Browse files
committed
Restored VectorBinaryDumper [skip ci]
1 parent f2ecf3c commit b4287d5

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

pgvector/psycopg/vector.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ class VectorBinaryDumper(VectorDumper):
2828
format = Format.BINARY
2929

3030
def dump(self, obj: 'Vector | np.ndarray') -> Buffer | None:
31-
return Vector._to_db_binary(obj)
31+
if not isinstance(obj, Vector):
32+
obj = Vector(obj)
33+
return obj.to_binary()
3234

3335

3436
class VectorLoader(Loader):

0 commit comments

Comments
 (0)