Skip to content

Commit 9b1110b

Browse files
committed
Sort __all__ lists
1 parent a92f640 commit 9b1110b

File tree

11 files changed

+30
-39
lines changed

11 files changed

+30
-39
lines changed

Diff for: array_api_compat/common/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
)
99

1010
__all__ = [
11-
"is_array_api_obj",
1211
"array_namespace",
13-
"get_namespace",
1412
"device",
15-
"to_device",
13+
"get_namespace",
14+
"is_array_api_obj",
1615
"size",
16+
"to_device",
1717
]

Diff for: array_api_compat/common/_aliases.py

-8
Original file line numberDiff line numberDiff line change
@@ -545,11 +545,3 @@ def isdtype(
545545
# more strict here to match the type annotation? Note that the
546546
# numpy.array_api implementation will be very strict.
547547
return dtype == kind
548-
549-
__all__ = ['arange', 'empty', 'empty_like', 'eye', 'full', 'full_like',
550-
'linspace', 'ones', 'ones_like', 'zeros', 'zeros_like',
551-
'UniqueAllResult', 'UniqueCountsResult', 'UniqueInverseResult',
552-
'unique_all', 'unique_counts', 'unique_inverse', 'unique_values',
553-
'astype', 'std', 'var', 'permute_dims', 'reshape', 'argsort',
554-
'sort', 'nonzero', 'sum', 'prod', 'ceil', 'floor', 'trunc',
555-
'matmul', 'matrix_transpose', 'tensordot', 'vecdot', 'isdtype']

Diff for: array_api_compat/cupy/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,12 @@
8181
]
8282

8383
__all__ += [
84-
"is_array_api_obj",
8584
"array_namespace",
86-
"get_namespace",
8785
"device",
88-
"to_device",
86+
"get_namespace",
87+
"is_array_api_obj",
8988
"size",
89+
"to_device",
9090
]
9191

9292
__all__ += [

Diff for: array_api_compat/cupy/_typing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from __future__ import annotations
22

33
__all__ = [
4-
"ndarray",
54
"Device",
65
"Dtype",
6+
"ndarray",
77
]
88

99
import sys

Diff for: array_api_compat/cupy/linalg.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -37,26 +37,26 @@
3737
__all__ += _cupy_linalg_all
3838

3939
__all__ += [
40-
"cross",
41-
"matmul",
42-
"outer",
43-
"tensordot",
4440
"EighResult",
4541
"QRResult",
46-
"SlogdetResult",
4742
"SVDResult",
43+
"SlogdetResult",
44+
"cholesky",
45+
"cross",
46+
"diagonal",
4847
"eigh",
48+
"matmul",
49+
"matrix_norm",
50+
"matrix_rank",
51+
"matrix_transpose",
52+
"outer",
53+
"pinv",
4954
"qr",
5055
"slogdet",
5156
"svd",
52-
"cholesky",
53-
"matrix_rank",
54-
"pinv",
55-
"matrix_norm",
56-
"matrix_transpose",
5757
"svdvals",
58+
"tensordot",
59+
"trace",
5860
"vecdot",
5961
"vector_norm",
60-
"diagonal",
61-
"trace",
6262
]

Diff for: array_api_compat/numpy/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,12 @@
8080
]
8181

8282
__all__ += [
83-
"is_array_api_obj",
8483
"array_namespace",
85-
"get_namespace",
8684
"device",
87-
"to_device",
85+
"get_namespace",
86+
"is_array_api_obj",
8887
"size",
88+
"to_device",
8989
]
9090

9191
__all__ += [

Diff for: array_api_compat/numpy/_aliases.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
import numpy as np
66

77
from .._internal import get_xp
8-
from ..common import _aliases
9-
from ..common import _linalg
8+
from ..common import _aliases, _linalg
109

1110
asarray = asarray_numpy = partial(_aliases._asarray, namespace="numpy")
1211
asarray.__doc__ = _aliases._asarray.__doc__

Diff for: array_api_compat/numpy/_typing.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
from __future__ import annotations
22

33
__all__ = [
4-
"ndarray",
54
"Device",
65
"Dtype",
6+
"ndarray",
77
]
88

99
import sys

Diff for: array_api_compat/numpy/linalg.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@
4040
__all__ += [
4141
"EighResult",
4242
"QRResult",
43-
"SlogdetResult",
4443
"SVDResult",
44+
"SlogdetResult",
4545
"cholesky",
4646
"cross",
4747
"diagonal",

Diff for: array_api_compat/torch/__init__.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ def exlcude(name):
106106
__all__ += _torch_all
107107

108108
__all__ += [
109-
"is_array_api_obj",
110109
"array_namespace",
111-
"get_namespace",
112110
"device",
113-
"to_device",
111+
"get_namespace",
112+
"is_array_api_obj",
114113
"size",
114+
"to_device",
115115
]
116116

117117
__all__ += [

Diff for: array_api_compat/torch/linalg.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525

2626
__all__ += [
2727
"matrix_transpose",
28+
"outer",
2829
"solve",
2930
"sum",
30-
"outer",
31-
"trace",
3231
"tensordot",
32+
"trace",
3333
"vecdot",
3434
]

0 commit comments

Comments
 (0)