Skip to content

Commit 158ea58

Browse files
committed
Expose public members from numpy an cupy in __all__ respectively
1 parent c447516 commit 158ea58

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

array_api_compat/cupy/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import cupy as _cp
12
from cupy import * # noqa: F401, F403
23

34
# from cupy import * doesn't overwrite these builtin names
45
from cupy import abs, max, min, round
56

7+
from .._internal import _get_all_public_members
68
from ..common._helpers import (
79
array_namespace,
810
device,
@@ -34,6 +36,8 @@
3436

3537
__all__ = []
3638

39+
__all__ += _get_all_public_members(_cp)
40+
3741
__all__ += [
3842
"abs",
3943
"max",

array_api_compat/numpy/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from numpy import * # noqa: F401, F403
2+
from numpy import __all__ as _numpy_all
23

34
# from numpy import * doesn't overwrite these builtin names
45
from numpy import abs, max, min, round
@@ -34,6 +35,8 @@
3435

3536
__all__ = []
3637

38+
__all__ += _numpy_all
39+
3740
__all__ += [
3841
"abs",
3942
"max",

0 commit comments

Comments
 (0)