Skip to content

Commit 0ec2d89

Browse files
committed
Add missing imports and sort __all__
1 parent b0a323d commit 0ec2d89

File tree

3 files changed

+177
-39
lines changed

3 files changed

+177
-39
lines changed

array_api_compat/cupy/__init__.py

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,21 +16,56 @@
1616

1717
# These imports may overwrite names from the import * above.
1818
from ._aliases import (
19+
UniqueAllResult,
20+
UniqueCountsResult,
21+
UniqueInverseResult,
1922
acos,
2023
acosh,
24+
arange,
25+
argsort,
2126
asarray,
2227
asarray_cupy,
2328
asin,
2429
asinh,
30+
astype,
2531
atan,
2632
atan2,
2733
atanh,
2834
bitwise_invert,
2935
bitwise_left_shift,
3036
bitwise_right_shift,
3137
bool,
38+
ceil,
3239
concat,
40+
empty,
41+
empty_like,
42+
eye,
43+
floor,
44+
full,
45+
full_like,
46+
isdtype,
47+
linspace,
48+
matmul,
49+
matrix_transpose,
50+
nonzero,
51+
ones,
52+
ones_like,
53+
permute_dims,
3354
pow,
55+
prod,
56+
reshape,
57+
sort,
58+
std,
59+
sum,
60+
tensordot,
61+
trunc,
62+
unique_all,
63+
unique_counts,
64+
unique_inverse,
65+
unique_values,
66+
var,
67+
zeros,
68+
zeros_like,
3469
)
3570
from .linalg import matrix_transpose, vecdot
3671

@@ -55,21 +90,56 @@
5590
]
5691

5792
__all__ += [
93+
"UniqueAllResult",
94+
"UniqueCountsResult",
95+
"UniqueInverseResult",
5896
"acos",
5997
"acosh",
98+
"arange",
99+
"argsort",
60100
"asarray",
61101
"asarray_cupy",
62102
"asin",
63103
"asinh",
104+
"astype",
64105
"atan",
65106
"atan2",
66107
"atanh",
67108
"bitwise_invert",
68109
"bitwise_left_shift",
69110
"bitwise_right_shift",
70111
"bool",
112+
"ceil",
71113
"concat",
114+
"empty",
115+
"empty_like",
116+
"eye",
117+
"floor",
118+
"full",
119+
"full_like",
120+
"isdtype",
121+
"linspace",
122+
"matmul",
123+
"matrix_transpose",
124+
"nonzero",
125+
"ones",
126+
"ones_like",
127+
"permute_dims",
72128
"pow",
129+
"prod",
130+
"reshape",
131+
"sort",
132+
"std",
133+
"sum",
134+
"tensordot",
135+
"trunc",
136+
"unique_all",
137+
"unique_counts",
138+
"unique_inverse",
139+
"unique_values",
140+
"var",
141+
"zeros",
142+
"zeros_like",
73143
]
74144

75145
__all__ += [

array_api_compat/numpy/__init__.py

Lines changed: 70 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,56 @@
1515

1616
# These imports may overwrite names from the import * above.
1717
from ._aliases import (
18+
UniqueAllResult,
19+
UniqueCountsResult,
20+
UniqueInverseResult,
1821
acos,
1922
acosh,
23+
arange,
24+
argsort,
2025
asarray,
2126
asarray_numpy,
2227
asin,
2328
asinh,
29+
astype,
2430
atan,
2531
atan2,
2632
atanh,
2733
bitwise_invert,
2834
bitwise_left_shift,
2935
bitwise_right_shift,
3036
bool,
37+
ceil,
3138
concat,
32-
pow,
39+
empty,
40+
empty_like,
41+
eye,
42+
floor,
43+
full,
44+
full_like,
3345
isdtype,
46+
linspace,
47+
matmul,
48+
matrix_transpose,
49+
nonzero,
50+
ones,
51+
ones_like,
52+
permute_dims,
53+
pow,
54+
prod,
55+
reshape,
56+
sort,
57+
std,
58+
sum,
59+
tensordot,
60+
trunc,
61+
unique_all,
62+
unique_counts,
63+
unique_inverse,
64+
unique_values,
65+
var,
66+
zeros,
67+
zeros_like,
3468
)
3569
from .linalg import matrix_transpose, vecdot
3670

@@ -55,22 +89,56 @@
5589
]
5690

5791
__all__ += [
92+
"UniqueAllResult",
93+
"UniqueCountsResult",
94+
"UniqueInverseResult",
5895
"acos",
5996
"acosh",
97+
"arange",
98+
"argsort",
6099
"asarray",
61100
"asarray_numpy",
62101
"asin",
63102
"asinh",
103+
"astype",
64104
"atan",
65105
"atan2",
66106
"atanh",
67107
"bitwise_invert",
68108
"bitwise_left_shift",
69109
"bitwise_right_shift",
70110
"bool",
111+
"ceil",
71112
"concat",
72-
"pow",
113+
"empty",
114+
"empty_like",
115+
"eye",
116+
"floor",
117+
"full",
118+
"full_like",
73119
"isdtype",
120+
"linspace",
121+
"matmul",
122+
"matrix_transpose",
123+
"nonzero",
124+
"ones",
125+
"ones_like",
126+
"permute_dims",
127+
"pow",
128+
"prod",
129+
"reshape",
130+
"sort",
131+
"std",
132+
"sum",
133+
"tensordot",
134+
"trunc",
135+
"unique_all",
136+
"unique_counts",
137+
"unique_inverse",
138+
"unique_values",
139+
"var",
140+
"zeros",
141+
"zeros_like",
74142
]
75143

76144
__all__ += [

array_api_compat/torch/__init__.py

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -115,71 +115,71 @@ def exlcude(name):
115115
]
116116

117117
__all__ += [
118-
"result_type",
119-
"can_cast",
120-
"permute_dims",
121-
"bitwise_invert",
122-
"newaxis",
123118
"add",
119+
"all",
120+
"any",
121+
"arange",
122+
"astype",
124123
"atan2",
125124
"bitwise_and",
125+
"bitwise_invert",
126126
"bitwise_left_shift",
127127
"bitwise_or",
128128
"bitwise_right_shift",
129129
"bitwise_xor",
130+
"broadcast_arrays",
131+
"broadcast_to",
132+
"can_cast",
133+
"concat",
130134
"divide",
135+
"empty",
131136
"equal",
137+
"expand_dims",
138+
"eye",
139+
"flip",
132140
"floor_divide",
141+
"full",
133142
"greater",
134143
"greater_equal",
144+
"isdtype",
135145
"less",
136146
"less_equal",
147+
"linspace",
137148
"logaddexp",
149+
"matmul",
150+
"matrix_transpose",
151+
"max",
152+
"mean",
153+
"min",
138154
"multiply",
155+
"newaxis",
156+
"nonzero",
139157
"not_equal",
158+
"ones",
159+
"permute_dims",
140160
"pow",
161+
"prod",
141162
"remainder",
142-
"subtract",
143-
"max",
144-
"min",
163+
"reshape",
164+
"result_type",
165+
"roll",
145166
"sort",
146-
"prod",
147-
"sum",
148-
"any",
149-
"all",
150-
"mean",
151-
"std",
152-
"var",
153-
"concat",
154167
"squeeze",
155-
"broadcast_to",
156-
"flip",
157-
"roll",
158-
"nonzero",
159-
"where",
160-
"reshape",
161-
"arange",
162-
"eye",
163-
"linspace",
164-
"full",
165-
"ones",
166-
"zeros",
167-
"empty",
168+
"std",
169+
"subtract",
170+
"sum",
171+
"take",
172+
"tensordot",
168173
"tril",
169174
"triu",
170-
"expand_dims",
171-
"astype",
172-
"broadcast_arrays",
173175
"unique_all",
174176
"unique_counts",
175177
"unique_inverse",
176178
"unique_values",
177-
"matmul",
178-
"matrix_transpose",
179+
"var",
179180
"vecdot",
180-
"tensordot",
181-
"isdtype",
182-
"take",
181+
"where",
182+
"zeros",
183183
]
184184

185185

0 commit comments

Comments
 (0)