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 9c4e772 commit adf844dCopy full SHA for adf844d
chromadb/api/types.py
@@ -149,7 +149,7 @@ def normalize_embeddings(
149
150
if len(target) == 0:
151
raise ValueError(
152
- f"Expected Embeddings to be non-empty list or numpy array, got {target}"
+ f"Expected embeddings to be non-empty list or numpy array, got {target}"
153
)
154
155
if isinstance(target, list):
@@ -158,6 +158,8 @@ def normalize_embeddings(
158
return [np.array(target, dtype=np.float32)]
159
# List of PyEmbeddings
160
if isinstance(target[0], list):
161
+ if len(target[0]) == 0:
162
+ raise ValueError("Expected embeddings to be at least 1-dimensional")
163
if isinstance(target[0][0], (int, float)) and not isinstance(
164
target[0][0], bool
165
):
0 commit comments