Skip to content

Commit e07659f

Browse files
committed
Updating typing for NumPy 1.24 to 1.26 - #158 [skip ci]
1 parent 86f1c40 commit e07659f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎pgvector/bit.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Bit:
1313

1414
def __init__(
1515
self,
16-
value: bytes | str | list[bool] | np.ndarray[tuple[int, ...], np.dtype[np.bool | np.uint8]],
16+
value: bytes | str | list[bool] | np.ndarray[tuple[int, ...], np.dtype[np.bool_ | np.uint8]],
1717
/
1818
) -> None:
1919
if isinstance(value, bytes):
@@ -65,7 +65,7 @@ def to_list(self) -> list[bool]:
6565
# TODO improve
6666
return [v != '0' for v in self.to_text()]
6767

68-
def to_numpy(self) -> np.ndarray[tuple[int, ...], np.dtype[np.bool]]:
68+
def to_numpy(self) -> np.ndarray[tuple[int, ...], np.dtype[np.bool_]]:
6969
import numpy as np
7070

7171
return np.unpackbits(np.frombuffer(self._data, dtype=np.uint8), count=self._length).astype(bool)

0 commit comments

Comments
 (0)