We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf0f4e9 commit a6465d1Copy full SHA for a6465d1
1 file changed
pgvector/sparsevec.py
@@ -74,7 +74,7 @@ def to_list(self) -> list[float]:
74
def to_numpy(self) -> np.ndarray[tuple[int, ...], np.dtype[np.float32]]:
75
import numpy as np
76
77
- vec = np.repeat(0.0, self._dim).astype(np.float32)
+ vec = np.zeros(self._dim, dtype=np.float32)
78
for i, v in zip(self._indices, self._values):
79
vec[i] = v
80
return vec
0 commit comments