We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cd053fc commit f494af9Copy full SHA for f494af9
bson/binary.py
@@ -511,7 +511,9 @@ def from_vector(
511
"Failed to create binary from vector. Check type. If numpy array, numpy must be installed."
512
) from exc
513
if not isinstance(vector, np.ndarray):
514
- raise TypeError("Vector must be a numpy array.")
+ raise TypeError(
515
+ "Could not create Binary. Vector must be a BinaryVector, list[int], list[float] or numpy ndarray."
516
+ )
517
if vector.ndim != 1:
518
raise ValueError(
519
"from_numpy_vector only supports 1D arrays as it creates a single vector."
0 commit comments