File tree Expand file tree Collapse file tree 2 files changed +307
-1
lines changed Expand file tree Collapse file tree 2 files changed +307
-1
lines changed Original file line number Diff line number Diff line change
1
+ from numpy import (
2
+ add ,
3
+ bitwise_and ,
4
+ bitwise_not ,
5
+ bitwise_or ,
6
+ bitwise_xor ,
7
+ can_cast ,
8
+ ceil ,
9
+ complex64 ,
10
+ complex128 ,
11
+ cos ,
12
+ cosh ,
13
+ divide ,
14
+ e ,
15
+ exp ,
16
+ expm1 ,
17
+ finfo ,
18
+ float16 ,
19
+ float32 ,
20
+ float64 ,
21
+ floor ,
22
+ floor_divide ,
23
+ greater ,
24
+ greater_equal ,
25
+ iinfo ,
26
+ inf ,
27
+ int8 ,
28
+ int16 ,
29
+ int32 ,
30
+ int64 ,
31
+ less ,
32
+ less_equal ,
33
+ log ,
34
+ log1p ,
35
+ log2 ,
36
+ log10 ,
37
+ logaddexp ,
38
+ logical_and ,
39
+ logical_not ,
40
+ logical_or ,
41
+ logical_xor ,
42
+ multiply ,
43
+ nan ,
44
+ negative ,
45
+ newaxis ,
46
+ not_equal ,
47
+ pi ,
48
+ positive ,
49
+ remainder ,
50
+ sign ,
51
+ sin ,
52
+ sinh ,
53
+ sqrt ,
54
+ square ,
55
+ subtract ,
56
+ tan ,
57
+ tanh ,
58
+ trunc ,
59
+ uint8 ,
60
+ uint16 ,
61
+ uint32 ,
62
+ uint64 ,
63
+ )
64
+ from numpy import arccos as acos
65
+ from numpy import arccosh as acosh
66
+ from numpy import arcsin as asin
67
+ from numpy import arcsinh as asinh
68
+ from numpy import arctan as atan
69
+ from numpy import arctan2 as atan2
70
+ from numpy import arctanh as atanh
71
+ from numpy import bool_ as bool
72
+ from numpy import invert as bitwise_invert
73
+ from numpy import left_shift as bitwise_left_shift
74
+ from numpy import power as pow
75
+ from numpy import right_shift as bitwise_right_shift
76
+
1
77
from ._common import (
2
78
SparseArray ,
3
79
abs ,
82
158
"GCXS" ,
83
159
"SparseArray" ,
84
160
"abs" ,
161
+ "acos" ,
162
+ "acosh" ,
163
+ "add" ,
85
164
"all" ,
86
165
"any" ,
87
166
"argmax" ,
90
169
"asCOO" ,
91
170
"as_coo" ,
92
171
"asarray" ,
172
+ "asin" ,
173
+ "asinh" ,
93
174
"asnumpy" ,
94
175
"astype" ,
176
+ "atan" ,
177
+ "atan2" ,
178
+ "atanh" ,
179
+ "bitwise_and" ,
180
+ "bitwise_invert" ,
181
+ "bitwise_left_shift" ,
182
+ "bitwise_not" ,
183
+ "bitwise_or" ,
184
+ "bitwise_right_shift" ,
185
+ "bitwise_xor" ,
186
+ "bool" ,
95
187
"broadcast_arrays" ,
96
188
"broadcast_to" ,
189
+ "can_cast" ,
190
+ "ceil" ,
97
191
"clip" ,
192
+ "complex128" ,
193
+ "complex64" ,
98
194
"concat" ,
99
195
"concatenate" ,
196
+ "cos" ,
197
+ "cosh" ,
100
198
"diagonal" ,
101
199
"diagonalize" ,
200
+ "divide" ,
102
201
"dot" ,
202
+ "e" ,
103
203
"einsum" ,
104
204
"elemwise" ,
105
205
"empty" ,
106
206
"empty_like" ,
107
207
"equal" ,
208
+ "exp" ,
209
+ "expm1" ,
108
210
"eye" ,
211
+ "finfo" ,
212
+ "float16" ,
213
+ "float32" ,
214
+ "float64" ,
215
+ "floor" ,
216
+ "floor_divide" ,
109
217
"full" ,
110
218
"full_like" ,
219
+ "greater" ,
220
+ "greater_equal" ,
221
+ "iinfo" ,
222
+ "inf" ,
223
+ "int16" ,
224
+ "int32" ,
225
+ "int64" ,
226
+ "int8" ,
111
227
"isfinite" ,
112
228
"isinf" ,
113
229
"isnan" ,
114
230
"isneginf" ,
115
231
"isposinf" ,
116
232
"kron" ,
233
+ "less" ,
234
+ "less_equal" ,
117
235
"load_npz" ,
236
+ "log" ,
237
+ "log10" ,
238
+ "log1p" ,
239
+ "log2" ,
240
+ "logaddexp" ,
241
+ "logical_and" ,
242
+ "logical_not" ,
243
+ "logical_or" ,
244
+ "logical_xor" ,
118
245
"matmul" ,
119
246
"max" ,
120
247
"mean" ,
121
248
"min" ,
122
249
"moveaxis" ,
123
- "moveaxis" ,
250
+ "multiply" ,
251
+ "nan" ,
124
252
"nanmax" ,
125
253
"nanmean" ,
126
254
"nanmin" ,
127
255
"nanprod" ,
128
256
"nanreduce" ,
129
257
"nansum" ,
258
+ "negative" ,
259
+ "newaxis" ,
130
260
"nonzero" ,
261
+ "not_equal" ,
131
262
"ones" ,
132
263
"ones_like" ,
133
264
"outer" ,
134
265
"pad" ,
135
266
"permute_dims" ,
267
+ "pi" ,
268
+ "positive" ,
269
+ "pow" ,
136
270
"prod" ,
137
271
"random" ,
272
+ "remainder" ,
138
273
"reshape" ,
139
274
"result_type" ,
140
275
"roll" ,
141
276
"round" ,
142
277
"save_npz" ,
278
+ "sign" ,
279
+ "sin" ,
280
+ "sinh" ,
281
+ "sqrt" ,
282
+ "square" ,
143
283
"squeeze" ,
144
284
"stack" ,
145
285
"std" ,
286
+ "subtract" ,
146
287
"sum" ,
288
+ "tan" ,
289
+ "tanh" ,
147
290
"tensordot" ,
148
291
"tril" ,
149
292
"triu" ,
293
+ "trunc" ,
294
+ "uint16" ,
295
+ "uint32" ,
296
+ "uint64" ,
297
+ "uint8" ,
150
298
"unique_counts" ,
151
299
"unique_values" ,
152
300
"where" ,
Original file line number Diff line number Diff line change
1
+ import sparse
2
+
3
+
4
+ def test_namespace ():
5
+ assert set (sparse .__all__ ) == {
6
+ "COO" ,
7
+ "DOK" ,
8
+ "GCXS" ,
9
+ "SparseArray" ,
10
+ "abs" ,
11
+ "acos" ,
12
+ "acosh" ,
13
+ "add" ,
14
+ "all" ,
15
+ "any" ,
16
+ "argmax" ,
17
+ "argmin" ,
18
+ "argwhere" ,
19
+ "asCOO" ,
20
+ "as_coo" ,
21
+ "asarray" ,
22
+ "asin" ,
23
+ "asinh" ,
24
+ "asnumpy" ,
25
+ "astype" ,
26
+ "atan" ,
27
+ "atan2" ,
28
+ "atanh" ,
29
+ "bitwise_and" ,
30
+ "bitwise_invert" ,
31
+ "bitwise_left_shift" ,
32
+ "bitwise_not" ,
33
+ "bitwise_or" ,
34
+ "bitwise_right_shift" ,
35
+ "bitwise_xor" ,
36
+ "bool" ,
37
+ "broadcast_arrays" ,
38
+ "broadcast_to" ,
39
+ "can_cast" ,
40
+ "ceil" ,
41
+ "clip" ,
42
+ "complex128" ,
43
+ "complex64" ,
44
+ "concat" ,
45
+ "concatenate" ,
46
+ "cos" ,
47
+ "cosh" ,
48
+ "diagonal" ,
49
+ "diagonalize" ,
50
+ "divide" ,
51
+ "dot" ,
52
+ "e" ,
53
+ "einsum" ,
54
+ "elemwise" ,
55
+ "empty" ,
56
+ "empty_like" ,
57
+ "equal" ,
58
+ "exp" ,
59
+ "expm1" ,
60
+ "eye" ,
61
+ "finfo" ,
62
+ "float16" ,
63
+ "float32" ,
64
+ "float64" ,
65
+ "floor" ,
66
+ "floor_divide" ,
67
+ "full" ,
68
+ "full_like" ,
69
+ "greater" ,
70
+ "greater_equal" ,
71
+ "iinfo" ,
72
+ "inf" ,
73
+ "int16" ,
74
+ "int32" ,
75
+ "int64" ,
76
+ "int8" ,
77
+ "isfinite" ,
78
+ "isinf" ,
79
+ "isnan" ,
80
+ "isneginf" ,
81
+ "isposinf" ,
82
+ "kron" ,
83
+ "less" ,
84
+ "less_equal" ,
85
+ "load_npz" ,
86
+ "log" ,
87
+ "log10" ,
88
+ "log1p" ,
89
+ "log2" ,
90
+ "logaddexp" ,
91
+ "logical_and" ,
92
+ "logical_not" ,
93
+ "logical_or" ,
94
+ "logical_xor" ,
95
+ "matmul" ,
96
+ "max" ,
97
+ "mean" ,
98
+ "min" ,
99
+ "moveaxis" ,
100
+ "multiply" ,
101
+ "nan" ,
102
+ "nanmax" ,
103
+ "nanmean" ,
104
+ "nanmin" ,
105
+ "nanprod" ,
106
+ "nanreduce" ,
107
+ "nansum" ,
108
+ "negative" ,
109
+ "newaxis" ,
110
+ "nonzero" ,
111
+ "not_equal" ,
112
+ "ones" ,
113
+ "ones_like" ,
114
+ "outer" ,
115
+ "pad" ,
116
+ "permute_dims" ,
117
+ "pi" ,
118
+ "positive" ,
119
+ "pow" ,
120
+ "prod" ,
121
+ "random" ,
122
+ "remainder" ,
123
+ "reshape" ,
124
+ "result_type" ,
125
+ "roll" ,
126
+ "round" ,
127
+ "save_npz" ,
128
+ "sign" ,
129
+ "sin" ,
130
+ "sinh" ,
131
+ "sqrt" ,
132
+ "square" ,
133
+ "squeeze" ,
134
+ "stack" ,
135
+ "std" ,
136
+ "subtract" ,
137
+ "sum" ,
138
+ "tan" ,
139
+ "tanh" ,
140
+ "tensordot" ,
141
+ "tril" ,
142
+ "triu" ,
143
+ "trunc" ,
144
+ "uint16" ,
145
+ "uint32" ,
146
+ "uint64" ,
147
+ "uint8" ,
148
+ "unique_counts" ,
149
+ "unique_values" ,
150
+ "where" ,
151
+ "zeros" ,
152
+ "zeros_like" ,
153
+ }
154
+
155
+ for attr in sparse .__all__ :
156
+ assert hasattr (sparse , attr )
157
+
158
+ assert sorted (sparse .__all__ ) == sparse .__all__
You can’t perform that action at this time.
0 commit comments