File tree Expand file tree Collapse file tree 5 files changed +4
-17
lines changed Expand file tree Collapse file tree 5 files changed +4
-17
lines changed Original file line number Diff line number Diff line change 88
99# See the comment in the numpy __init__.py
1010__import__ (__package__ + '.linalg' )
11-
1211__import__ (__package__ + '.fft' )
1312
14- from ..common ._helpers import * # noqa: F401,F403
15-
1613__array_api_version__ = '2024.12'
Original file line number Diff line number Diff line change 55
66__array_api_version__ = '2024.12'
77
8+ # See the comment in the numpy __init__.py
89__import__ (__package__ + '.linalg' )
910__import__ (__package__ + '.fft' )
Original file line number Diff line number Diff line change 1414# It doesn't overwrite np.linalg from above. The import is generated
1515# dynamically so that the library can be vendored.
1616__import__ (__package__ + '.linalg' )
17-
1817__import__ (__package__ + '.fft' )
1918
2019from .linalg import matrix_transpose , vecdot # noqa: F401
2120
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-
3021__array_api_version__ = '2024.12'
Original file line number Diff line number Diff line change @@ -86,7 +86,7 @@ def asarray(
8686 * ,
8787 dtype : Optional [DType ] = None ,
8888 device : Optional [Device ] = None ,
89- copy : " Optional[Union[bool, np._CopyMode]]" = None ,
89+ copy : Optional [Union [bool , np ._CopyMode ]] = None ,
9090 ** kwargs ,
9191) -> Array :
9292 """
Original file line number Diff line number Diff line change 99 or 'cpu' in n
1010 or 'backward' in n ):
1111 continue
12- exec (n + ' = torch.' + n )
12+ exec (f"{ n } = torch.{ n } " )
13+ del n
1314
1415# These imports may overwrite names from the import * above.
1516from ._aliases import * # noqa: F403
1617
1718# See the comment in the numpy __init__.py
1819__import__ (__package__ + '.linalg' )
19-
2020__import__ (__package__ + '.fft' )
2121
22- from ..common ._helpers import * # noqa: F403
23-
2422__array_api_version__ = '2024.12'
You can’t perform that action at this time.
0 commit comments