Skip to content

Commit 634215c

Browse files
committed
Fixed quoting for Python < 3.12 [skip ci]
1 parent 6deaa5f commit 634215c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pgvector/halfvec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def to_numpy(self) -> np.ndarray[tuple[int], np.dtype[np.float16]]:
4747
return np.frombuffer(self._value, dtype='>f2', count=self.dimensions(), offset=4)
4848

4949
def to_text(self) -> str:
50-
return f'[{','.join([str(v) for v in self.to_list()])}]'
50+
return f'[{",".join([str(v) for v in self.to_list()])}]'
5151

5252
def to_binary(self) -> bytes:
5353
return self._value

pgvector/vector.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def to_numpy(self) -> np.ndarray[tuple[int], np.dtype[np.float32]]:
4747
return np.frombuffer(self._value, dtype='>f4', count=self.dimensions(), offset=4)
4848

4949
def to_text(self) -> str:
50-
return f'[{','.join([str(v) for v in self.to_list()])}]'
50+
return f'[{",".join([str(v) for v in self.to_list()])}]'
5151

5252
def to_binary(self) -> bytes:
5353
return self._value

0 commit comments

Comments
 (0)