Skip to content

Commit 10da245

Browse files
Update bson/binary.py
Include all DTypes in TypeError message. Co-authored-by: Jib <Jibzade@gmail.com>
1 parent 0b0a50b commit 10da245

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bson/binary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ def from_vector(
481481
padding = 0 if padding is None else padding
482482
if not isinstance(dtype, BinaryVectorDtype):
483483
raise TypeError(
484-
"dtype must be a bson.BinaryVectorDtype, such as BinaryVectorDtype.FLOAT32"
484+
"dtype must be a bson.BinaryVectorDtype of BinaryVectorDType.INT8, PACKED_BIT, FLOAT32"
485485
)
486486
metadata = struct.pack("<sB", dtype.value, padding)
487487

0 commit comments

Comments
 (0)