We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 240e413 commit f1ce5f3Copy full SHA for f1ce5f3
pgvector/utils/sparsevec.py
@@ -13,8 +13,6 @@ def __repr__(self):
13
return f'SparseVector({self._dim}, {self._indices}, {self._values})'
14
15
def from_dense(value):
16
- if isinstance(value, np.ndarray):
17
- value = value.tolist()
18
dim = len(value)
19
indices = [i for i, v in enumerate(value) if v != 0]
20
values = [float(value[i]) for i in indices]
0 commit comments