File tree 5 files changed +4
-17
lines changed
5 files changed +4
-17
lines changed Original file line number Diff line number Diff line change 8
8
9
9
# See the comment in the numpy __init__.py
10
10
__import__ (__package__ + '.linalg' )
11
-
12
11
__import__ (__package__ + '.fft' )
13
12
14
- from ..common ._helpers import * # noqa: F401,F403
15
-
16
13
__array_api_version__ = '2024.12'
Original file line number Diff line number Diff line change 5
5
6
6
__array_api_version__ = '2024.12'
7
7
8
+ # See the comment in the numpy __init__.py
8
9
__import__ (__package__ + '.linalg' )
9
10
__import__ (__package__ + '.fft' )
Original file line number Diff line number Diff line change 14
14
# It doesn't overwrite np.linalg from above. The import is generated
15
15
# dynamically so that the library can be vendored.
16
16
__import__ (__package__ + '.linalg' )
17
-
18
17
__import__ (__package__ + '.fft' )
19
18
20
19
from .linalg import matrix_transpose , vecdot # noqa: F401
21
20
22
- from ..common ._helpers import * # noqa: F403
23
-
24
- try :
25
- # Used in asarray(). Not present in older versions.
26
- from numpy import _CopyMode # noqa: F401
27
- except ImportError :
28
- pass
29
-
30
21
__array_api_version__ = '2024.12'
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ def asarray(
86
86
* ,
87
87
dtype : Optional [DType ] = None ,
88
88
device : Optional [Device ] = None ,
89
- copy : " Optional[Union[bool, np._CopyMode]]" = None ,
89
+ copy : Optional [Union [bool , np ._CopyMode ]] = None ,
90
90
** kwargs ,
91
91
) -> Array :
92
92
"""
Original file line number Diff line number Diff line change 9
9
or 'cpu' in n
10
10
or 'backward' in n ):
11
11
continue
12
- exec (n + ' = torch.' + n )
12
+ exec (f"{ n } = torch.{ n } " )
13
+ del n
13
14
14
15
# These imports may overwrite names from the import * above.
15
16
from ._aliases import * # noqa: F403
16
17
17
18
# See the comment in the numpy __init__.py
18
19
__import__ (__package__ + '.linalg' )
19
-
20
20
__import__ (__package__ + '.fft' )
21
21
22
- from ..common ._helpers import * # noqa: F403
23
-
24
22
__array_api_version__ = '2024.12'
You can’t perform that action at this time.
0 commit comments