Skip to content

TYP: import annotations for sklearn #76

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 3, 2025
Merged
Show file tree
Hide file tree
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
5 changes: 4 additions & 1 deletion src/array_api_extra/_funcs.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""Public API Functions."""

# https://github.com/scikit-learn/scikit-learn/pull/27910#issuecomment-2568023972
from __future__ import annotations

import operator
import warnings

Expand Down Expand Up @@ -719,7 +722,7 @@ def __init__(
self._x = x
self._idx = idx

def __getitem__(self, idx: Index, /) -> "at": # numpydoc ignore=PR01,RT01
def __getitem__(self, idx: Index, /) -> at: # numpydoc ignore=PR01,RT01
"""
Allow for the alternate syntax ``at(x)[start:stop:step]``.

Expand Down
3 changes: 3 additions & 0 deletions src/array_api_extra/_lib/_compat.pyi
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""Static type stubs for `_compat.py`."""

# https://github.com/scikit-learn/scikit-learn/pull/27910#issuecomment-2568023972
from __future__ import annotations

from types import ModuleType

from ._typing import Array, Device
Expand Down
3 changes: 3 additions & 0 deletions src/array_api_extra/_lib/_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
"""Utility functions used by `array_api_extra/_funcs.py`."""

# https://github.com/scikit-learn/scikit-learn/pull/27910#issuecomment-2568023972
from __future__ import annotations

from . import _compat
from ._typing import Array, ModuleType

Expand Down
Loading