Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion chromadb/base_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def from_dict(cls, d: Dict[str, Any]) -> "SparseVector":
Metadata = Mapping[str, Optional[Union[str, int, float, bool, SparseVector]]]
UpdateMetadata = Mapping[str, Union[int, float, str, bool, SparseVector, None]]
PyVector = Union[Sequence[float], Sequence[int]]
Vector = NDArray[Union[np.int32, np.float32]] # TODO: Specify that the vector is 1D
Vector = NDArray[np.float32] #Clarified to represent a 1D float32 vector
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Advisory

[Style] Good clarification. To make the comment more durable and descriptive of the code itself (rather than the change), consider rephrasing it to explain what the type represents. Also, PEP 8 suggests a space after the # for inline comments.

Context for Agents
Good clarification. To make the comment more durable and descriptive of the code itself (rather than the change), consider rephrasing it to explain what the type represents. Also, PEP 8 suggests a space after the `#` for inline comments.

File: chromadb/base_types.py
Line: 122

# Metadata Query Grammar
LiteralValue = Union[str, int, float, bool]
LogicalOperator = Union[Literal["$and"], Literal["$or"]]
Expand Down