Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions stubs/hnswlib/hnswlib.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,15 @@ class Index:
def get_ids_list(self) -> list[int]: ...

@overload
def get_items(self, ids: ArrayLike | None = ..., return_type: Literal["list"] = ...) -> list[float]: ...
def get_items(self, ids: ArrayLike | None = None, return_type: Literal["numpy"] = "numpy") -> NDArray[np.float32]: ...
@overload
def get_items(self, ids: ArrayLike | None = ..., return_type: Literal["numpy"] = ...) -> NDArray[np.float32]: ...
def get_items(self, ids: ArrayLike | None, return_type: Literal["list"]) -> list[list[float]]: ...
@overload
def get_items(self, ids: ArrayLike | None = None, *, return_type: Literal["list"]) -> list[list[float]]: ...
@overload
def get_items(
self, ids: ArrayLike | None = None, return_type: Literal["numpy", "list"] = "numpy"
) -> NDArray[np.float32] | list[float]: ...
) -> NDArray[np.float32] | list[list[float]]: ...

def get_max_elements(self) -> int: ...
def index_file_size(self) -> int: ...
Expand Down
Loading