Skip to content

Commit

Permalink
Update chromadb/api/types.py
Browse files Browse the repository at this point in the history
Co-authored-by: Hammad Bashir <[email protected]>
  • Loading branch information
tazarov and HammadB authored Sep 18, 2023
1 parent 48b6730 commit 653e09d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chromadb/api/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def validate_n_results(n_results: int) -> int:
def validate_embeddings(
embeddings: Union[Embeddings, np.ndarray[Any, Any]]
) -> Embeddings:
"""Validates embeddings to ensure it is a list of list of ints, or floats"""
"""Validates embeddings to ensure it is a list of list of ints, or floats. If it is a valid numpy array, it casts it to a python list."""
if not isinstance(embeddings, (list, np.ndarray)):
raise ValueError(f"Expected embeddings to be a list, got {embeddings}")
if len(embeddings) == 0:
Expand Down

0 comments on commit 653e09d

Please sign in to comment.