Skip to content

Commit 5db1a93

Browse files
committed
clean up
1 parent 9dcb9e5 commit 5db1a93

File tree

7 files changed

+12
-9
lines changed

7 files changed

+12
-9
lines changed

src/array_api_extra/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Extra array functions built on top of the array API standard."""
22

3-
from ._delegators import pad
3+
from ._delegation import pad
44
from ._lib._funcs import (
55
at,
66
atleast_nd,

src/array_api_extra/_delegators.py renamed to src/array_api_extra/_delegation.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
"""Delegators to existing implementations for Public API Functions."""
1+
"""Delegation to existing implementations for Public API Functions."""
2+
3+
from types import ModuleType
24

35
from ._lib import _funcs
46
from ._lib._utils._compat import (
@@ -8,7 +10,7 @@
810
is_numpy_namespace,
911
is_torch_namespace,
1012
)
11-
from ._lib._utils._typing import Array, ModuleType
13+
from ._lib._utils._typing import Array
1214

1315

1416
def pad(
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
"""Array-agnostic implementations for the public API."""
1+
"""Internals of array-api-extra."""

src/array_api_extra/_lib/_funcs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Public API Functions."""
1+
"""Array-agnostic implementations for the public API."""
22

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

src/array_api_extra/_lib/_utils/_helpers.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
# https://github.com/scikit-learn/scikit-learn/pull/27910#issuecomment-2568023972
44
from __future__ import annotations
55

6+
from types import ModuleType
7+
68
from . import _compat
7-
from ._typing import Array, ModuleType
9+
from ._typing import Array
810

911
__all__ = ["in1d", "mean"]
1012

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
"""Static typing helpers."""
22

3-
from types import ModuleType
43
from typing import Any
54

65
# To be changed to a Protocol later (see data-apis/array-api#589)
76
Array = Any # type: ignore[no-any-explicit]
87
Device = Any # type: ignore[no-any-explicit]
98
Index = Any # type: ignore[no-any-explicit]
109

11-
__all__ = ["Array", "Device", "Index", "ModuleType"]
10+
__all__ = ["Array", "Device", "Index"]

tests/test_at.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
)
1414

1515
from array_api_extra import at
16-
from array_api_extra._lib._typing import Array
16+
from array_api_extra._lib._utils._typing import Array
1717

1818
all_libraries = (
1919
"array_api_strict",

0 commit comments

Comments
 (0)