Skip to content

Commit 38a6644

Browse files
committed
Move the builtin overrides to _aliases.py
1 parent fbaf586 commit 38a6644

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

numpy_array_api_compat/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,6 @@
3030

3131
from numpy import *
3232

33-
# from numpy import * doesn't overwrite these builtin names
34-
from numpy import abs, max, min, round
35-
3633
# These imports may overwrite names from the import * above.
3734
from ._aliases import *
3835

numpy_array_api_compat/_aliases.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,6 @@ def astype(x: ndarray, dtype: dtype, /, *, copy: bool = True) -> ndarray:
117117
if not copy and dtype == x.dtype:
118118
return x
119119
return x.astype(dtype=dtype, copy=copy)
120+
121+
# from numpy import * doesn't overwrite these builtin names
122+
from numpy import abs, max, min, round

0 commit comments

Comments
 (0)