Skip to content

Commit c451fb0

Browse files
committed
Improved code consistency [skip ci]
1 parent 63f5a48 commit c451fb0

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
@@ -119,7 +119,7 @@ def _from_sparse(self, arr: sparray | spmatrix, /) -> None:
119119
else:
120120
indices = value.col.tolist()
121121

122-
elements = [v for v in zip(indices, value.data) if v[1] != 0]
122+
elements = [(i, v) for i, v in zip(indices, value.data) if v != 0]
123123

124124
# has_canonical_format added in scipy 1.12+
125125
if not hasattr(value, 'has_canonical_format') or not value.has_canonical_format:

0 commit comments

Comments
 (0)