Skip to content

Commit 05a7c0c

Browse files
committed
Improved __eq__ for SparseVector [skip ci]
1 parent 2cff2f8 commit 05a7c0c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pgvector/sparsevec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def __repr__(self) -> str:
5151

5252
def __eq__(self, other: object) -> bool:
5353
if isinstance(other, self.__class__):
54-
return self.dimensions() == other.dimensions() and self.indices() == other.indices() and self.values() == other.values()
54+
return self._dim == other._dim and self._indices == other._indices and self._values == other._values
5555
return False
5656

5757
def dimensions(self) -> int:

0 commit comments

Comments
 (0)