flopscope 0.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- benchmarks/__init__.py +1 -0
- benchmarks/__main__.py +6 -0
- benchmarks/_baseline.py +171 -0
- benchmarks/_bitwise.py +231 -0
- benchmarks/_complex.py +176 -0
- benchmarks/_contractions.py +291 -0
- benchmarks/_fft.py +198 -0
- benchmarks/_impl_urls.py +139 -0
- benchmarks/_linalg.py +197 -0
- benchmarks/_linalg_delegates.py +407 -0
- benchmarks/_metadata.py +141 -0
- benchmarks/_misc.py +653 -0
- benchmarks/_perf.py +321 -0
- benchmarks/_perm_group_calibration.py +175 -0
- benchmarks/_pointwise.py +372 -0
- benchmarks/_polynomial.py +193 -0
- benchmarks/_random.py +209 -0
- benchmarks/_reductions.py +136 -0
- benchmarks/_sorting.py +289 -0
- benchmarks/_stats.py +137 -0
- benchmarks/_window.py +92 -0
- benchmarks/accumulation/__init__.py +0 -0
- benchmarks/accumulation/bench_cost_compute.py +138 -0
- benchmarks/dashboard.py +312 -0
- benchmarks/runner.py +636 -0
- flopscope/__init__.py +273 -0
- flopscope/_accumulation/__init__.py +13 -0
- flopscope/_accumulation/_bipartite.py +121 -0
- flopscope/_accumulation/_burnside.py +51 -0
- flopscope/_accumulation/_cache.py +146 -0
- flopscope/_accumulation/_components.py +153 -0
- flopscope/_accumulation/_cost.py +1414 -0
- flopscope/_accumulation/_cost_descriptions.py +63 -0
- flopscope/_accumulation/_detection.py +318 -0
- flopscope/_accumulation/_ladder.py +191 -0
- flopscope/_accumulation/_output_orbit.py +104 -0
- flopscope/_accumulation/_partition.py +290 -0
- flopscope/_accumulation/_path_info.py +211 -0
- flopscope/_accumulation/_public.py +169 -0
- flopscope/_accumulation/_reduction.py +310 -0
- flopscope/_accumulation/_regimes.py +303 -0
- flopscope/_accumulation/_shape.py +33 -0
- flopscope/_accumulation/_wreath.py +209 -0
- flopscope/_budget.py +1027 -0
- flopscope/_config.py +118 -0
- flopscope/_counting_ops.py +451 -0
- flopscope/_display.py +478 -0
- flopscope/_docstrings.py +59 -0
- flopscope/_dtypes.py +20 -0
- flopscope/_einsum.py +717 -0
- flopscope/_errstate.py +25 -0
- flopscope/_flops.py +282 -0
- flopscope/_free_ops.py +2654 -0
- flopscope/_ndarray.py +1126 -0
- flopscope/_opt_einsum/LICENSE +21 -0
- flopscope/_opt_einsum/NOTICE +59 -0
- flopscope/_opt_einsum/__init__.py +209 -0
- flopscope/_opt_einsum/_contract.py +1478 -0
- flopscope/_opt_einsum/_helpers.py +164 -0
- flopscope/_opt_einsum/_hsluv.py +273 -0
- flopscope/_opt_einsum/_path_random.py +462 -0
- flopscope/_opt_einsum/_paths.py +1653 -0
- flopscope/_opt_einsum/_subgraph_symmetry.py +544 -0
- flopscope/_opt_einsum/_symmetry.py +140 -0
- flopscope/_opt_einsum/_typing.py +37 -0
- flopscope/_perm_group.py +717 -0
- flopscope/_pointwise.py +2522 -0
- flopscope/_polynomial.py +278 -0
- flopscope/_registry.py +3216 -0
- flopscope/_sorting_ops.py +571 -0
- flopscope/_symmetric.py +812 -0
- flopscope/_symmetry_transport.py +510 -0
- flopscope/_symmetry_utils.py +669 -0
- flopscope/_type_info.py +12 -0
- flopscope/_unwrap.py +70 -0
- flopscope/_validation.py +83 -0
- flopscope/_version_check.py +46 -0
- flopscope/_weights.py +195 -0
- flopscope/_window.py +177 -0
- flopscope/accounting.py +565 -0
- flopscope/data/default_weights.json +462 -0
- flopscope/data/weights.csv +509 -0
- flopscope/errors.py +197 -0
- flopscope/numpy/__init__.py +878 -0
- flopscope/numpy/fft/__init__.py +55 -0
- flopscope/numpy/fft/_free.py +51 -0
- flopscope/numpy/fft/_transforms.py +695 -0
- flopscope/numpy/linalg/__init__.py +105 -0
- flopscope/numpy/linalg/_aliases.py +126 -0
- flopscope/numpy/linalg/_compound.py +161 -0
- flopscope/numpy/linalg/_decompositions.py +353 -0
- flopscope/numpy/linalg/_properties.py +533 -0
- flopscope/numpy/linalg/_solvers.py +444 -0
- flopscope/numpy/linalg/_svd.py +122 -0
- flopscope/numpy/random/__init__.py +684 -0
- flopscope/numpy/random/_cost_formulas.py +115 -0
- flopscope/numpy/random/_counted_classes.py +241 -0
- flopscope/numpy/testing/__init__.py +13 -0
- flopscope/numpy/typing/__init__.py +30 -0
- flopscope/py.typed +0 -0
- flopscope/stats/__init__.py +84 -0
- flopscope/stats/_base.py +77 -0
- flopscope/stats/_cauchy.py +146 -0
- flopscope/stats/_erf.py +190 -0
- flopscope/stats/_expon.py +146 -0
- flopscope/stats/_laplace.py +150 -0
- flopscope/stats/_logistic.py +148 -0
- flopscope/stats/_lognorm.py +160 -0
- flopscope/stats/_ndtri.py +133 -0
- flopscope/stats/_norm.py +149 -0
- flopscope/stats/_truncnorm.py +186 -0
- flopscope/stats/_uniform.py +141 -0
- flopscope-0.2.0.dist-info/METADATA +23 -0
- flopscope-0.2.0.dist-info/RECORD +115 -0
- flopscope-0.2.0.dist-info/WHEEL +4 -0
flopscope/_registry.py
ADDED
|
@@ -0,0 +1,3216 @@
|
|
|
1
|
+
"""Registry of all public numpy 2.x callables with FLOP-counting categories.
|
|
2
|
+
|
|
3
|
+
Categories
|
|
4
|
+
----------
|
|
5
|
+
counted_unary scalar math on each element, cost = numel(output)
|
|
6
|
+
counted_binary element-wise binary op, cost = numel(output)
|
|
7
|
+
counted_reduction reduce array, cost = numel(input)
|
|
8
|
+
counted_custom bespoke cost formulas
|
|
9
|
+
counted_random_method method on Generator/RandomState, counted via cost_formula
|
|
10
|
+
free zero FLOP cost (allocation, indexing, shape ops, etc.)
|
|
11
|
+
free_random_method method on Generator/RandomState, no FLOP cost (state, spawn, etc.)
|
|
12
|
+
blacklisted intentionally unsupported
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
|
|
17
|
+
REGISTRY_META: dict = {
|
|
18
|
+
"numpy_version": "2.4.4",
|
|
19
|
+
"numpy_supported": ">=2.0.0,<2.5.0",
|
|
20
|
+
"last_updated": "2026-04-17",
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
# ---------------------------------------------------------------------------
|
|
24
|
+
# Full registry — every entry has: category, module, notes
|
|
25
|
+
# ---------------------------------------------------------------------------
|
|
26
|
+
REGISTRY: dict[str, dict] = {
|
|
27
|
+
# ------------------------------------------------------------------
|
|
28
|
+
# counted_unary — implemented in _pointwise.py
|
|
29
|
+
# ------------------------------------------------------------------
|
|
30
|
+
"abs": {
|
|
31
|
+
"category": "counted_unary",
|
|
32
|
+
"module": "numpy",
|
|
33
|
+
"notes": "Element-wise absolute value; alias for absolute.",
|
|
34
|
+
},
|
|
35
|
+
"absolute": {
|
|
36
|
+
"category": "counted_unary",
|
|
37
|
+
"module": "numpy",
|
|
38
|
+
"notes": "Element-wise absolute value.",
|
|
39
|
+
},
|
|
40
|
+
"negative": {
|
|
41
|
+
"category": "counted_unary",
|
|
42
|
+
"module": "numpy",
|
|
43
|
+
"notes": "Element-wise negation.",
|
|
44
|
+
},
|
|
45
|
+
"positive": {
|
|
46
|
+
"category": "counted_unary",
|
|
47
|
+
"module": "numpy",
|
|
48
|
+
"notes": "Element-wise unary plus (copy with sign preserved).",
|
|
49
|
+
},
|
|
50
|
+
"exp": {
|
|
51
|
+
"category": "counted_unary",
|
|
52
|
+
"module": "numpy",
|
|
53
|
+
"notes": "Element-wise e^x.",
|
|
54
|
+
},
|
|
55
|
+
"exp2": {
|
|
56
|
+
"category": "counted_unary",
|
|
57
|
+
"module": "numpy",
|
|
58
|
+
"notes": "Element-wise 2^x.",
|
|
59
|
+
},
|
|
60
|
+
"expm1": {
|
|
61
|
+
"category": "counted_unary",
|
|
62
|
+
"module": "numpy",
|
|
63
|
+
"notes": "Element-wise e^x - 1 (accurate near zero).",
|
|
64
|
+
},
|
|
65
|
+
"log": {
|
|
66
|
+
"category": "counted_unary",
|
|
67
|
+
"module": "numpy",
|
|
68
|
+
"notes": "Element-wise natural logarithm.",
|
|
69
|
+
},
|
|
70
|
+
"log2": {
|
|
71
|
+
"category": "counted_unary",
|
|
72
|
+
"module": "numpy",
|
|
73
|
+
"notes": "Element-wise base-2 logarithm.",
|
|
74
|
+
},
|
|
75
|
+
"log10": {
|
|
76
|
+
"category": "counted_unary",
|
|
77
|
+
"module": "numpy",
|
|
78
|
+
"notes": "Element-wise base-10 logarithm.",
|
|
79
|
+
},
|
|
80
|
+
"log1p": {
|
|
81
|
+
"category": "counted_unary",
|
|
82
|
+
"module": "numpy",
|
|
83
|
+
"notes": "Element-wise log(1+x) (accurate near zero).",
|
|
84
|
+
},
|
|
85
|
+
"sqrt": {
|
|
86
|
+
"category": "counted_unary",
|
|
87
|
+
"module": "numpy",
|
|
88
|
+
"notes": "Element-wise square root.",
|
|
89
|
+
},
|
|
90
|
+
"cbrt": {
|
|
91
|
+
"category": "counted_unary",
|
|
92
|
+
"module": "numpy",
|
|
93
|
+
"notes": "Element-wise cube root.",
|
|
94
|
+
},
|
|
95
|
+
"square": {
|
|
96
|
+
"category": "counted_unary",
|
|
97
|
+
"module": "numpy",
|
|
98
|
+
"notes": "Element-wise x^2.",
|
|
99
|
+
},
|
|
100
|
+
"reciprocal": {
|
|
101
|
+
"category": "counted_unary",
|
|
102
|
+
"module": "numpy",
|
|
103
|
+
"notes": "Element-wise 1/x.",
|
|
104
|
+
},
|
|
105
|
+
"sin": {
|
|
106
|
+
"category": "counted_unary",
|
|
107
|
+
"module": "numpy",
|
|
108
|
+
"notes": "Element-wise sine.",
|
|
109
|
+
},
|
|
110
|
+
"cos": {
|
|
111
|
+
"category": "counted_unary",
|
|
112
|
+
"module": "numpy",
|
|
113
|
+
"notes": "Element-wise cosine.",
|
|
114
|
+
},
|
|
115
|
+
"tan": {
|
|
116
|
+
"category": "counted_unary",
|
|
117
|
+
"module": "numpy",
|
|
118
|
+
"notes": "Element-wise tangent.",
|
|
119
|
+
},
|
|
120
|
+
"arcsin": {
|
|
121
|
+
"category": "counted_unary",
|
|
122
|
+
"module": "numpy",
|
|
123
|
+
"notes": "Element-wise inverse sine.",
|
|
124
|
+
},
|
|
125
|
+
"arccos": {
|
|
126
|
+
"category": "counted_unary",
|
|
127
|
+
"module": "numpy",
|
|
128
|
+
"notes": "Element-wise inverse cosine.",
|
|
129
|
+
},
|
|
130
|
+
"arctan": {
|
|
131
|
+
"category": "counted_unary",
|
|
132
|
+
"module": "numpy",
|
|
133
|
+
"notes": "Element-wise inverse tangent.",
|
|
134
|
+
},
|
|
135
|
+
"sinh": {
|
|
136
|
+
"category": "counted_unary",
|
|
137
|
+
"module": "numpy",
|
|
138
|
+
"notes": "Element-wise hyperbolic sine.",
|
|
139
|
+
},
|
|
140
|
+
"cosh": {
|
|
141
|
+
"category": "counted_unary",
|
|
142
|
+
"module": "numpy",
|
|
143
|
+
"notes": "Element-wise hyperbolic cosine.",
|
|
144
|
+
},
|
|
145
|
+
"tanh": {
|
|
146
|
+
"category": "counted_unary",
|
|
147
|
+
"module": "numpy",
|
|
148
|
+
"notes": "Element-wise hyperbolic tangent.",
|
|
149
|
+
},
|
|
150
|
+
"arcsinh": {
|
|
151
|
+
"category": "counted_unary",
|
|
152
|
+
"module": "numpy",
|
|
153
|
+
"notes": "Element-wise inverse hyperbolic sine.",
|
|
154
|
+
},
|
|
155
|
+
"arccosh": {
|
|
156
|
+
"category": "counted_unary",
|
|
157
|
+
"module": "numpy",
|
|
158
|
+
"notes": "Element-wise inverse hyperbolic cosine.",
|
|
159
|
+
},
|
|
160
|
+
"arctanh": {
|
|
161
|
+
"category": "counted_unary",
|
|
162
|
+
"module": "numpy",
|
|
163
|
+
"notes": "Element-wise inverse hyperbolic tangent.",
|
|
164
|
+
},
|
|
165
|
+
# asin/acos/atan/asinh/acosh/atanh — NumPy 2.x aliases
|
|
166
|
+
"asin": {
|
|
167
|
+
"category": "counted_unary",
|
|
168
|
+
"module": "numpy",
|
|
169
|
+
"notes": "Alias for arcsin (NumPy 2.x).",
|
|
170
|
+
},
|
|
171
|
+
"acos": {
|
|
172
|
+
"category": "counted_unary",
|
|
173
|
+
"module": "numpy",
|
|
174
|
+
"notes": "Alias for arccos (NumPy 2.x).",
|
|
175
|
+
},
|
|
176
|
+
"atan": {
|
|
177
|
+
"category": "counted_unary",
|
|
178
|
+
"module": "numpy",
|
|
179
|
+
"notes": "Alias for arctan (NumPy 2.x).",
|
|
180
|
+
},
|
|
181
|
+
"asinh": {
|
|
182
|
+
"category": "counted_unary",
|
|
183
|
+
"module": "numpy",
|
|
184
|
+
"notes": "Alias for arcsinh (NumPy 2.x).",
|
|
185
|
+
},
|
|
186
|
+
"acosh": {
|
|
187
|
+
"category": "counted_unary",
|
|
188
|
+
"module": "numpy",
|
|
189
|
+
"notes": "Alias for arccosh (NumPy 2.x).",
|
|
190
|
+
},
|
|
191
|
+
"atanh": {
|
|
192
|
+
"category": "counted_unary",
|
|
193
|
+
"module": "numpy",
|
|
194
|
+
"notes": "Alias for arctanh (NumPy 2.x).",
|
|
195
|
+
},
|
|
196
|
+
"degrees": {
|
|
197
|
+
"category": "counted_unary",
|
|
198
|
+
"module": "numpy",
|
|
199
|
+
"notes": "Convert radians to degrees element-wise.",
|
|
200
|
+
},
|
|
201
|
+
"radians": {
|
|
202
|
+
"category": "counted_unary",
|
|
203
|
+
"module": "numpy",
|
|
204
|
+
"notes": "Convert degrees to radians element-wise.",
|
|
205
|
+
},
|
|
206
|
+
"deg2rad": {
|
|
207
|
+
"category": "counted_unary",
|
|
208
|
+
"module": "numpy",
|
|
209
|
+
"notes": "Alias for radians.",
|
|
210
|
+
},
|
|
211
|
+
"rad2deg": {
|
|
212
|
+
"category": "counted_unary",
|
|
213
|
+
"module": "numpy",
|
|
214
|
+
"notes": "Alias for degrees.",
|
|
215
|
+
},
|
|
216
|
+
"sign": {
|
|
217
|
+
"category": "counted_unary",
|
|
218
|
+
"module": "numpy",
|
|
219
|
+
"notes": "Element-wise sign function.",
|
|
220
|
+
},
|
|
221
|
+
"signbit": {
|
|
222
|
+
"category": "counted_unary",
|
|
223
|
+
"module": "numpy",
|
|
224
|
+
"notes": "Returns True for elements with negative sign bit.",
|
|
225
|
+
},
|
|
226
|
+
"fabs": {
|
|
227
|
+
"category": "counted_unary",
|
|
228
|
+
"module": "numpy",
|
|
229
|
+
"notes": "Element-wise absolute value (always float).",
|
|
230
|
+
},
|
|
231
|
+
"ceil": {
|
|
232
|
+
"category": "counted_unary",
|
|
233
|
+
"module": "numpy",
|
|
234
|
+
"notes": "Element-wise ceiling.",
|
|
235
|
+
},
|
|
236
|
+
"floor": {
|
|
237
|
+
"category": "counted_unary",
|
|
238
|
+
"module": "numpy",
|
|
239
|
+
"notes": "Element-wise floor.",
|
|
240
|
+
},
|
|
241
|
+
"rint": {
|
|
242
|
+
"category": "counted_unary",
|
|
243
|
+
"module": "numpy",
|
|
244
|
+
"notes": "Round to nearest integer element-wise.",
|
|
245
|
+
},
|
|
246
|
+
"trunc": {
|
|
247
|
+
"category": "counted_unary",
|
|
248
|
+
"module": "numpy",
|
|
249
|
+
"notes": "Truncate toward zero element-wise.",
|
|
250
|
+
},
|
|
251
|
+
"fix": {
|
|
252
|
+
"category": "counted_unary",
|
|
253
|
+
"module": "numpy",
|
|
254
|
+
"notes": "Round toward zero element-wise (alias for trunc).",
|
|
255
|
+
},
|
|
256
|
+
"round": {
|
|
257
|
+
"category": "counted_unary",
|
|
258
|
+
"module": "numpy",
|
|
259
|
+
"notes": "Round to given number of decimals element-wise.",
|
|
260
|
+
},
|
|
261
|
+
"around": {
|
|
262
|
+
"category": "counted_unary",
|
|
263
|
+
"module": "numpy",
|
|
264
|
+
"notes": "Alias for round.",
|
|
265
|
+
},
|
|
266
|
+
"spacing": {
|
|
267
|
+
"category": "counted_unary",
|
|
268
|
+
"module": "numpy",
|
|
269
|
+
"notes": "Return ULP spacing for each element.",
|
|
270
|
+
},
|
|
271
|
+
"logical_not": {
|
|
272
|
+
"category": "counted_unary",
|
|
273
|
+
"module": "numpy",
|
|
274
|
+
"notes": "Element-wise logical NOT.",
|
|
275
|
+
},
|
|
276
|
+
"bitwise_not": {
|
|
277
|
+
"category": "counted_unary",
|
|
278
|
+
"module": "numpy",
|
|
279
|
+
"notes": "Element-wise bitwise NOT.",
|
|
280
|
+
},
|
|
281
|
+
"bitwise_invert": {
|
|
282
|
+
"category": "counted_unary",
|
|
283
|
+
"module": "numpy",
|
|
284
|
+
"notes": "Element-wise bitwise invert (alias for bitwise_not).",
|
|
285
|
+
},
|
|
286
|
+
"bitwise_count": {
|
|
287
|
+
"category": "counted_unary",
|
|
288
|
+
"module": "numpy",
|
|
289
|
+
"min_numpy": "2.1",
|
|
290
|
+
"notes": "Count set bits element-wise (popcount).",
|
|
291
|
+
},
|
|
292
|
+
"invert": {
|
|
293
|
+
"category": "counted_unary",
|
|
294
|
+
"module": "numpy",
|
|
295
|
+
"notes": "Bitwise NOT element-wise.",
|
|
296
|
+
},
|
|
297
|
+
"conj": {
|
|
298
|
+
"category": "counted_unary",
|
|
299
|
+
"module": "numpy",
|
|
300
|
+
"notes": "Complex conjugate element-wise.",
|
|
301
|
+
},
|
|
302
|
+
"conjugate": {
|
|
303
|
+
"category": "counted_unary",
|
|
304
|
+
"module": "numpy",
|
|
305
|
+
"notes": "Complex conjugate element-wise.",
|
|
306
|
+
},
|
|
307
|
+
"angle": {
|
|
308
|
+
"category": "counted_unary",
|
|
309
|
+
"module": "numpy",
|
|
310
|
+
"notes": "Return angle of complex argument element-wise.",
|
|
311
|
+
},
|
|
312
|
+
"real": {
|
|
313
|
+
"category": "counted_unary",
|
|
314
|
+
"module": "numpy",
|
|
315
|
+
"notes": "Return real part of complex array.",
|
|
316
|
+
},
|
|
317
|
+
"imag": {
|
|
318
|
+
"category": "counted_unary",
|
|
319
|
+
"module": "numpy",
|
|
320
|
+
"notes": "Return imaginary part of complex array.",
|
|
321
|
+
},
|
|
322
|
+
"sinc": {
|
|
323
|
+
"category": "counted_unary",
|
|
324
|
+
"module": "numpy",
|
|
325
|
+
"notes": "Normalized sinc function element-wise.",
|
|
326
|
+
},
|
|
327
|
+
"i0": {
|
|
328
|
+
"category": "counted_unary",
|
|
329
|
+
"module": "numpy",
|
|
330
|
+
"notes": "Modified Bessel function of order 0, element-wise.",
|
|
331
|
+
},
|
|
332
|
+
"nan_to_num": {
|
|
333
|
+
"category": "counted_unary",
|
|
334
|
+
"module": "numpy",
|
|
335
|
+
"notes": "Replace NaN/inf with finite numbers element-wise.",
|
|
336
|
+
},
|
|
337
|
+
"modf": {
|
|
338
|
+
"category": "counted_unary",
|
|
339
|
+
"module": "numpy",
|
|
340
|
+
"notes": "Return fractional and integral parts element-wise.",
|
|
341
|
+
},
|
|
342
|
+
"frexp": {
|
|
343
|
+
"category": "counted_unary",
|
|
344
|
+
"module": "numpy",
|
|
345
|
+
"notes": "Decompose x into mantissa and exponent element-wise.",
|
|
346
|
+
},
|
|
347
|
+
"isclose": {
|
|
348
|
+
"category": "counted_unary",
|
|
349
|
+
"module": "numpy",
|
|
350
|
+
"notes": "Element-wise approximate equality test.",
|
|
351
|
+
},
|
|
352
|
+
"isnat": {
|
|
353
|
+
"category": "blacklisted",
|
|
354
|
+
"module": "numpy",
|
|
355
|
+
"notes": "Blacklisted per reviewer — datetime ops not in scope.",
|
|
356
|
+
},
|
|
357
|
+
"isneginf": {
|
|
358
|
+
"category": "counted_unary",
|
|
359
|
+
"module": "numpy",
|
|
360
|
+
"notes": "Test for negative infinity element-wise.",
|
|
361
|
+
},
|
|
362
|
+
"isposinf": {
|
|
363
|
+
"category": "counted_unary",
|
|
364
|
+
"module": "numpy",
|
|
365
|
+
"notes": "Test for positive infinity element-wise.",
|
|
366
|
+
},
|
|
367
|
+
"isreal": {
|
|
368
|
+
"category": "counted_unary",
|
|
369
|
+
"module": "numpy",
|
|
370
|
+
"notes": "Test if element is real (imag == 0) element-wise.",
|
|
371
|
+
},
|
|
372
|
+
"iscomplex": {
|
|
373
|
+
"category": "counted_unary",
|
|
374
|
+
"module": "numpy",
|
|
375
|
+
"notes": "Test if element is complex element-wise.",
|
|
376
|
+
},
|
|
377
|
+
"iscomplexobj": {
|
|
378
|
+
"category": "counted_unary",
|
|
379
|
+
"module": "numpy",
|
|
380
|
+
"notes": "Return True if input is a complex type or array.",
|
|
381
|
+
},
|
|
382
|
+
"isrealobj": {
|
|
383
|
+
"category": "counted_unary",
|
|
384
|
+
"module": "numpy",
|
|
385
|
+
"notes": "Return True if x is a not complex type or array.",
|
|
386
|
+
},
|
|
387
|
+
"real_if_close": {
|
|
388
|
+
"category": "counted_unary",
|
|
389
|
+
"module": "numpy",
|
|
390
|
+
"notes": "Return real array if imaginary part is negligible.",
|
|
391
|
+
},
|
|
392
|
+
"sort_complex": {
|
|
393
|
+
"category": "counted_custom",
|
|
394
|
+
"module": "numpy",
|
|
395
|
+
"notes": "Sort complex array. Cost: $n \\cdot \\lceil\\log_2 n\\rceil$.",
|
|
396
|
+
},
|
|
397
|
+
# ------------------------------------------------------------------
|
|
398
|
+
# counted_binary — implemented in _pointwise.py
|
|
399
|
+
# ------------------------------------------------------------------
|
|
400
|
+
"add": {
|
|
401
|
+
"category": "counted_binary",
|
|
402
|
+
"module": "numpy",
|
|
403
|
+
"notes": "Element-wise addition.",
|
|
404
|
+
},
|
|
405
|
+
"subtract": {
|
|
406
|
+
"category": "counted_binary",
|
|
407
|
+
"module": "numpy",
|
|
408
|
+
"notes": "Element-wise subtraction.",
|
|
409
|
+
},
|
|
410
|
+
"multiply": {
|
|
411
|
+
"category": "counted_binary",
|
|
412
|
+
"module": "numpy",
|
|
413
|
+
"notes": "Element-wise multiplication.",
|
|
414
|
+
},
|
|
415
|
+
"divide": {
|
|
416
|
+
"category": "counted_binary",
|
|
417
|
+
"module": "numpy",
|
|
418
|
+
"notes": "Element-wise true division.",
|
|
419
|
+
},
|
|
420
|
+
"true_divide": {
|
|
421
|
+
"category": "counted_binary",
|
|
422
|
+
"module": "numpy",
|
|
423
|
+
"notes": "Element-wise true division (explicit).",
|
|
424
|
+
},
|
|
425
|
+
"floor_divide": {
|
|
426
|
+
"category": "counted_binary",
|
|
427
|
+
"module": "numpy",
|
|
428
|
+
"notes": "Element-wise floor division.",
|
|
429
|
+
},
|
|
430
|
+
"power": {
|
|
431
|
+
"category": "counted_binary",
|
|
432
|
+
"module": "numpy",
|
|
433
|
+
"notes": "Element-wise exponentiation x**y.",
|
|
434
|
+
},
|
|
435
|
+
"pow": {
|
|
436
|
+
"category": "counted_binary",
|
|
437
|
+
"module": "numpy",
|
|
438
|
+
"notes": "Alias for power (NumPy 2.x).",
|
|
439
|
+
},
|
|
440
|
+
"float_power": {
|
|
441
|
+
"category": "counted_binary",
|
|
442
|
+
"module": "numpy",
|
|
443
|
+
"notes": "Element-wise exponentiation in float64.",
|
|
444
|
+
},
|
|
445
|
+
"mod": {
|
|
446
|
+
"category": "counted_binary",
|
|
447
|
+
"module": "numpy",
|
|
448
|
+
"notes": "Element-wise modulo.",
|
|
449
|
+
},
|
|
450
|
+
"remainder": {
|
|
451
|
+
"category": "counted_binary",
|
|
452
|
+
"module": "numpy",
|
|
453
|
+
"notes": "Element-wise remainder (same as mod).",
|
|
454
|
+
},
|
|
455
|
+
"fmod": {
|
|
456
|
+
"category": "counted_binary",
|
|
457
|
+
"module": "numpy",
|
|
458
|
+
"notes": "Element-wise C-style fmod (remainder toward zero).",
|
|
459
|
+
},
|
|
460
|
+
"maximum": {
|
|
461
|
+
"category": "counted_binary",
|
|
462
|
+
"module": "numpy",
|
|
463
|
+
"notes": "Element-wise maximum (propagates NaN).",
|
|
464
|
+
},
|
|
465
|
+
"minimum": {
|
|
466
|
+
"category": "counted_binary",
|
|
467
|
+
"module": "numpy",
|
|
468
|
+
"notes": "Element-wise minimum (propagates NaN).",
|
|
469
|
+
},
|
|
470
|
+
"fmax": {
|
|
471
|
+
"category": "counted_binary",
|
|
472
|
+
"module": "numpy",
|
|
473
|
+
"notes": "Element-wise maximum ignoring NaN.",
|
|
474
|
+
},
|
|
475
|
+
"fmin": {
|
|
476
|
+
"category": "counted_binary",
|
|
477
|
+
"module": "numpy",
|
|
478
|
+
"notes": "Element-wise minimum ignoring NaN.",
|
|
479
|
+
},
|
|
480
|
+
"logaddexp": {
|
|
481
|
+
"category": "counted_binary",
|
|
482
|
+
"module": "numpy",
|
|
483
|
+
"notes": "log(exp(x1) + exp(x2)) element-wise.",
|
|
484
|
+
},
|
|
485
|
+
"logaddexp2": {
|
|
486
|
+
"category": "counted_binary",
|
|
487
|
+
"module": "numpy",
|
|
488
|
+
"notes": "log2(2**x1 + 2**x2) element-wise.",
|
|
489
|
+
},
|
|
490
|
+
"arctan2": {
|
|
491
|
+
"category": "counted_binary",
|
|
492
|
+
"module": "numpy",
|
|
493
|
+
"notes": "Element-wise arctan(y/x) considering quadrant.",
|
|
494
|
+
},
|
|
495
|
+
"atan2": {
|
|
496
|
+
"category": "counted_binary",
|
|
497
|
+
"module": "numpy",
|
|
498
|
+
"notes": "Alias for arctan2 (NumPy 2.x).",
|
|
499
|
+
},
|
|
500
|
+
"hypot": {
|
|
501
|
+
"category": "counted_binary",
|
|
502
|
+
"module": "numpy",
|
|
503
|
+
"notes": "Element-wise Euclidean norm sqrt(x1^2 + x2^2).",
|
|
504
|
+
},
|
|
505
|
+
"copysign": {
|
|
506
|
+
"category": "counted_binary",
|
|
507
|
+
"module": "numpy",
|
|
508
|
+
"notes": "Copy sign of x2 to magnitude of x1 element-wise.",
|
|
509
|
+
},
|
|
510
|
+
"nextafter": {
|
|
511
|
+
"category": "counted_binary",
|
|
512
|
+
"module": "numpy",
|
|
513
|
+
"notes": "Return next float after x1 toward x2 element-wise.",
|
|
514
|
+
},
|
|
515
|
+
"ldexp": {
|
|
516
|
+
"category": "counted_binary",
|
|
517
|
+
"module": "numpy",
|
|
518
|
+
"notes": "Return x1 * 2**x2 element-wise.",
|
|
519
|
+
},
|
|
520
|
+
"heaviside": {
|
|
521
|
+
"category": "counted_binary",
|
|
522
|
+
"module": "numpy",
|
|
523
|
+
"notes": "Heaviside step function element-wise.",
|
|
524
|
+
},
|
|
525
|
+
"greater": {
|
|
526
|
+
"category": "counted_binary",
|
|
527
|
+
"module": "numpy",
|
|
528
|
+
"notes": "Element-wise x1 > x2.",
|
|
529
|
+
},
|
|
530
|
+
"greater_equal": {
|
|
531
|
+
"category": "counted_binary",
|
|
532
|
+
"module": "numpy",
|
|
533
|
+
"notes": "Element-wise x1 >= x2.",
|
|
534
|
+
},
|
|
535
|
+
"less": {
|
|
536
|
+
"category": "counted_binary",
|
|
537
|
+
"module": "numpy",
|
|
538
|
+
"notes": "Element-wise x1 < x2.",
|
|
539
|
+
},
|
|
540
|
+
"less_equal": {
|
|
541
|
+
"category": "counted_binary",
|
|
542
|
+
"module": "numpy",
|
|
543
|
+
"notes": "Element-wise x1 <= x2.",
|
|
544
|
+
},
|
|
545
|
+
"equal": {
|
|
546
|
+
"category": "counted_binary",
|
|
547
|
+
"module": "numpy",
|
|
548
|
+
"notes": "Element-wise x1 == x2.",
|
|
549
|
+
},
|
|
550
|
+
"not_equal": {
|
|
551
|
+
"category": "counted_binary",
|
|
552
|
+
"module": "numpy",
|
|
553
|
+
"notes": "Element-wise x1 != x2.",
|
|
554
|
+
},
|
|
555
|
+
"logical_and": {
|
|
556
|
+
"category": "counted_binary",
|
|
557
|
+
"module": "numpy",
|
|
558
|
+
"notes": "Element-wise logical AND.",
|
|
559
|
+
},
|
|
560
|
+
"logical_or": {
|
|
561
|
+
"category": "counted_binary",
|
|
562
|
+
"module": "numpy",
|
|
563
|
+
"notes": "Element-wise logical OR.",
|
|
564
|
+
},
|
|
565
|
+
"logical_xor": {
|
|
566
|
+
"category": "counted_binary",
|
|
567
|
+
"module": "numpy",
|
|
568
|
+
"notes": "Element-wise logical XOR.",
|
|
569
|
+
},
|
|
570
|
+
"bitwise_and": {
|
|
571
|
+
"category": "counted_binary",
|
|
572
|
+
"module": "numpy",
|
|
573
|
+
"notes": "Element-wise bitwise AND.",
|
|
574
|
+
},
|
|
575
|
+
"bitwise_or": {
|
|
576
|
+
"category": "counted_binary",
|
|
577
|
+
"module": "numpy",
|
|
578
|
+
"notes": "Element-wise bitwise OR.",
|
|
579
|
+
},
|
|
580
|
+
"bitwise_xor": {
|
|
581
|
+
"category": "counted_binary",
|
|
582
|
+
"module": "numpy",
|
|
583
|
+
"notes": "Element-wise bitwise XOR.",
|
|
584
|
+
},
|
|
585
|
+
"bitwise_left_shift": {
|
|
586
|
+
"category": "counted_binary",
|
|
587
|
+
"module": "numpy",
|
|
588
|
+
"notes": "Element-wise left bit shift.",
|
|
589
|
+
},
|
|
590
|
+
"bitwise_right_shift": {
|
|
591
|
+
"category": "counted_binary",
|
|
592
|
+
"module": "numpy",
|
|
593
|
+
"notes": "Element-wise right bit shift.",
|
|
594
|
+
},
|
|
595
|
+
"left_shift": {
|
|
596
|
+
"category": "counted_binary",
|
|
597
|
+
"module": "numpy",
|
|
598
|
+
"notes": "Element-wise left bit shift (legacy name).",
|
|
599
|
+
},
|
|
600
|
+
"right_shift": {
|
|
601
|
+
"category": "counted_binary",
|
|
602
|
+
"module": "numpy",
|
|
603
|
+
"notes": "Element-wise right bit shift (legacy name).",
|
|
604
|
+
},
|
|
605
|
+
"gcd": {
|
|
606
|
+
"category": "counted_binary",
|
|
607
|
+
"module": "numpy",
|
|
608
|
+
"notes": "Element-wise greatest common divisor.",
|
|
609
|
+
},
|
|
610
|
+
"lcm": {
|
|
611
|
+
"category": "counted_binary",
|
|
612
|
+
"module": "numpy",
|
|
613
|
+
"notes": "Element-wise least common multiple.",
|
|
614
|
+
},
|
|
615
|
+
"divmod": {
|
|
616
|
+
"category": "counted_binary",
|
|
617
|
+
"module": "numpy",
|
|
618
|
+
"notes": "Element-wise (quotient, remainder) tuple.",
|
|
619
|
+
},
|
|
620
|
+
"vecdot": {
|
|
621
|
+
"category": "counted_binary",
|
|
622
|
+
"module": "numpy",
|
|
623
|
+
"min_numpy": "2.1",
|
|
624
|
+
"notes": "Vector dot product along last axis.",
|
|
625
|
+
},
|
|
626
|
+
"matvec": {
|
|
627
|
+
"category": "counted_binary",
|
|
628
|
+
"module": "numpy",
|
|
629
|
+
"min_numpy": "2.2",
|
|
630
|
+
"notes": "Matrix-vector product. Cost = output_size * contracted_axis.",
|
|
631
|
+
},
|
|
632
|
+
"vecmat": {
|
|
633
|
+
"category": "counted_binary",
|
|
634
|
+
"module": "numpy",
|
|
635
|
+
"min_numpy": "2.2",
|
|
636
|
+
"notes": "Vector-matrix product. Cost = output_size * contracted_axis.",
|
|
637
|
+
},
|
|
638
|
+
# ------------------------------------------------------------------
|
|
639
|
+
# counted_reduction — implemented in _pointwise.py
|
|
640
|
+
# ------------------------------------------------------------------
|
|
641
|
+
"sum": {
|
|
642
|
+
"category": "counted_reduction",
|
|
643
|
+
"module": "numpy",
|
|
644
|
+
"notes": "Sum of array elements.",
|
|
645
|
+
},
|
|
646
|
+
"prod": {
|
|
647
|
+
"category": "counted_reduction",
|
|
648
|
+
"module": "numpy",
|
|
649
|
+
"notes": "Product of array elements.",
|
|
650
|
+
},
|
|
651
|
+
"max": {
|
|
652
|
+
"category": "counted_reduction",
|
|
653
|
+
"module": "numpy",
|
|
654
|
+
"notes": "Maximum value of array.",
|
|
655
|
+
},
|
|
656
|
+
"min": {
|
|
657
|
+
"category": "counted_reduction",
|
|
658
|
+
"module": "numpy",
|
|
659
|
+
"notes": "Minimum value of array.",
|
|
660
|
+
},
|
|
661
|
+
"amax": {
|
|
662
|
+
"category": "counted_reduction",
|
|
663
|
+
"module": "numpy",
|
|
664
|
+
"notes": "Maximum value of array (alias for max/numpy.amax).",
|
|
665
|
+
},
|
|
666
|
+
"amin": {
|
|
667
|
+
"category": "counted_reduction",
|
|
668
|
+
"module": "numpy",
|
|
669
|
+
"notes": "Minimum value of array (alias for min/numpy.amin).",
|
|
670
|
+
},
|
|
671
|
+
"mean": {
|
|
672
|
+
"category": "counted_reduction",
|
|
673
|
+
"module": "numpy",
|
|
674
|
+
"notes": "Arithmetic mean of array elements.",
|
|
675
|
+
},
|
|
676
|
+
"std": {
|
|
677
|
+
"category": "counted_reduction",
|
|
678
|
+
"module": "numpy",
|
|
679
|
+
"notes": "Standard deviation; cost_multiplier=2 (two passes).",
|
|
680
|
+
},
|
|
681
|
+
"var": {
|
|
682
|
+
"category": "counted_reduction",
|
|
683
|
+
"module": "numpy",
|
|
684
|
+
"notes": "Variance; cost_multiplier=2 (two passes).",
|
|
685
|
+
},
|
|
686
|
+
"argmax": {
|
|
687
|
+
"category": "counted_reduction",
|
|
688
|
+
"module": "numpy",
|
|
689
|
+
"notes": "Index of maximum value.",
|
|
690
|
+
},
|
|
691
|
+
"argmin": {
|
|
692
|
+
"category": "counted_reduction",
|
|
693
|
+
"module": "numpy",
|
|
694
|
+
"notes": "Index of minimum value.",
|
|
695
|
+
},
|
|
696
|
+
"cumsum": {
|
|
697
|
+
"category": "counted_reduction",
|
|
698
|
+
"module": "numpy",
|
|
699
|
+
"notes": "Cumulative sum of array elements.",
|
|
700
|
+
},
|
|
701
|
+
"cumprod": {
|
|
702
|
+
"category": "counted_reduction",
|
|
703
|
+
"module": "numpy",
|
|
704
|
+
"notes": "Cumulative product of array elements.",
|
|
705
|
+
},
|
|
706
|
+
"any": {
|
|
707
|
+
"category": "counted_reduction",
|
|
708
|
+
"module": "numpy",
|
|
709
|
+
"notes": "Test whether any array element is true.",
|
|
710
|
+
},
|
|
711
|
+
"all": {
|
|
712
|
+
"category": "counted_reduction",
|
|
713
|
+
"module": "numpy",
|
|
714
|
+
"notes": "Test whether all array elements are true.",
|
|
715
|
+
},
|
|
716
|
+
"count_nonzero": {
|
|
717
|
+
"category": "counted_reduction",
|
|
718
|
+
"module": "numpy",
|
|
719
|
+
"notes": "Count non-zero elements.",
|
|
720
|
+
},
|
|
721
|
+
"nansum": {
|
|
722
|
+
"category": "counted_reduction",
|
|
723
|
+
"module": "numpy",
|
|
724
|
+
"notes": "Sum ignoring NaNs.",
|
|
725
|
+
},
|
|
726
|
+
"nanprod": {
|
|
727
|
+
"category": "counted_reduction",
|
|
728
|
+
"module": "numpy",
|
|
729
|
+
"notes": "Product ignoring NaNs.",
|
|
730
|
+
},
|
|
731
|
+
"nanmax": {
|
|
732
|
+
"category": "counted_reduction",
|
|
733
|
+
"module": "numpy",
|
|
734
|
+
"notes": "Maximum ignoring NaNs.",
|
|
735
|
+
},
|
|
736
|
+
"nanmin": {
|
|
737
|
+
"category": "counted_reduction",
|
|
738
|
+
"module": "numpy",
|
|
739
|
+
"notes": "Minimum ignoring NaNs.",
|
|
740
|
+
},
|
|
741
|
+
"nanmean": {
|
|
742
|
+
"category": "counted_reduction",
|
|
743
|
+
"module": "numpy",
|
|
744
|
+
"notes": "Mean ignoring NaNs.",
|
|
745
|
+
},
|
|
746
|
+
"nanstd": {
|
|
747
|
+
"category": "counted_reduction",
|
|
748
|
+
"module": "numpy",
|
|
749
|
+
"notes": "Standard deviation ignoring NaNs.",
|
|
750
|
+
},
|
|
751
|
+
"nanvar": {
|
|
752
|
+
"category": "counted_reduction",
|
|
753
|
+
"module": "numpy",
|
|
754
|
+
"notes": "Variance ignoring NaNs.",
|
|
755
|
+
},
|
|
756
|
+
"nanargmax": {
|
|
757
|
+
"category": "counted_reduction",
|
|
758
|
+
"module": "numpy",
|
|
759
|
+
"notes": "Index of maximum ignoring NaNs.",
|
|
760
|
+
},
|
|
761
|
+
"nanargmin": {
|
|
762
|
+
"category": "counted_reduction",
|
|
763
|
+
"module": "numpy",
|
|
764
|
+
"notes": "Index of minimum ignoring NaNs.",
|
|
765
|
+
},
|
|
766
|
+
"nancumsum": {
|
|
767
|
+
"category": "counted_reduction",
|
|
768
|
+
"module": "numpy",
|
|
769
|
+
"notes": "Cumulative sum ignoring NaNs.",
|
|
770
|
+
},
|
|
771
|
+
"nancumprod": {
|
|
772
|
+
"category": "counted_reduction",
|
|
773
|
+
"module": "numpy",
|
|
774
|
+
"notes": "Cumulative product ignoring NaNs.",
|
|
775
|
+
},
|
|
776
|
+
"median": {
|
|
777
|
+
"category": "counted_reduction",
|
|
778
|
+
"module": "numpy",
|
|
779
|
+
"notes": "Median of array elements (sorts internally).",
|
|
780
|
+
},
|
|
781
|
+
"nanmedian": {
|
|
782
|
+
"category": "counted_reduction",
|
|
783
|
+
"module": "numpy",
|
|
784
|
+
"notes": "Median ignoring NaNs.",
|
|
785
|
+
},
|
|
786
|
+
"percentile": {
|
|
787
|
+
"category": "counted_reduction",
|
|
788
|
+
"module": "numpy",
|
|
789
|
+
"notes": "q-th percentile of array elements.",
|
|
790
|
+
},
|
|
791
|
+
"nanpercentile": {
|
|
792
|
+
"category": "counted_reduction",
|
|
793
|
+
"module": "numpy",
|
|
794
|
+
"notes": "q-th percentile ignoring NaNs.",
|
|
795
|
+
},
|
|
796
|
+
"quantile": {
|
|
797
|
+
"category": "counted_reduction",
|
|
798
|
+
"module": "numpy",
|
|
799
|
+
"notes": "q-th quantile of array elements.",
|
|
800
|
+
},
|
|
801
|
+
"nanquantile": {
|
|
802
|
+
"category": "counted_reduction",
|
|
803
|
+
"module": "numpy",
|
|
804
|
+
"notes": "q-th quantile ignoring NaNs.",
|
|
805
|
+
},
|
|
806
|
+
"ptp": {
|
|
807
|
+
"category": "counted_reduction",
|
|
808
|
+
"module": "numpy",
|
|
809
|
+
"notes": "Peak-to-peak (max - min) range of array.",
|
|
810
|
+
},
|
|
811
|
+
"average": {
|
|
812
|
+
"category": "counted_reduction",
|
|
813
|
+
"module": "numpy",
|
|
814
|
+
"notes": "Weighted average of array elements.",
|
|
815
|
+
},
|
|
816
|
+
"cumulative_sum": {
|
|
817
|
+
"category": "counted_reduction",
|
|
818
|
+
"module": "numpy",
|
|
819
|
+
"min_numpy": "2.1",
|
|
820
|
+
"notes": "Cumulative sum (NumPy 2.x array API).",
|
|
821
|
+
},
|
|
822
|
+
"cumulative_prod": {
|
|
823
|
+
"category": "counted_reduction",
|
|
824
|
+
"module": "numpy",
|
|
825
|
+
"min_numpy": "2.1",
|
|
826
|
+
"notes": "Cumulative product (NumPy 2.x array API).",
|
|
827
|
+
},
|
|
828
|
+
# ------------------------------------------------------------------
|
|
829
|
+
# counted_custom — implemented in _pointwise.py / _einsum.py
|
|
830
|
+
# ------------------------------------------------------------------
|
|
831
|
+
"dot": {
|
|
832
|
+
"category": "counted_custom",
|
|
833
|
+
"module": "numpy",
|
|
834
|
+
"notes": "Dot product; cost = M*K*N (weight-calibrated).",
|
|
835
|
+
},
|
|
836
|
+
"matmul": {
|
|
837
|
+
"category": "counted_custom",
|
|
838
|
+
"module": "numpy",
|
|
839
|
+
"notes": "Matrix multiplication; cost = M*K*N (weight-calibrated).",
|
|
840
|
+
},
|
|
841
|
+
"einsum": {
|
|
842
|
+
"category": "counted_custom",
|
|
843
|
+
"module": "numpy",
|
|
844
|
+
"notes": "Generalized Einstein summation.",
|
|
845
|
+
},
|
|
846
|
+
"einsum_path": {
|
|
847
|
+
"category": "counted_custom",
|
|
848
|
+
"module": "numpy",
|
|
849
|
+
"notes": "Optimize einsum contraction path (no numeric output).",
|
|
850
|
+
},
|
|
851
|
+
"clip": {
|
|
852
|
+
"category": "counted_custom",
|
|
853
|
+
"module": "numpy",
|
|
854
|
+
"notes": "Clip array to [a_min, a_max] element-wise.",
|
|
855
|
+
},
|
|
856
|
+
"inner": {
|
|
857
|
+
"category": "counted_custom",
|
|
858
|
+
"module": "numpy",
|
|
859
|
+
"notes": "Inner product; cost = N (weight-calibrated).",
|
|
860
|
+
},
|
|
861
|
+
"outer": {
|
|
862
|
+
"category": "counted_custom",
|
|
863
|
+
"module": "numpy",
|
|
864
|
+
"notes": "Outer product of two vectors; cost = M*N.",
|
|
865
|
+
},
|
|
866
|
+
"tensordot": {
|
|
867
|
+
"category": "counted_custom",
|
|
868
|
+
"module": "numpy",
|
|
869
|
+
"notes": "Tensor dot product along specified axes.",
|
|
870
|
+
},
|
|
871
|
+
"vdot": {
|
|
872
|
+
"category": "counted_custom",
|
|
873
|
+
"module": "numpy",
|
|
874
|
+
"notes": "Dot product with conjugation; cost = N (weight-calibrated).",
|
|
875
|
+
},
|
|
876
|
+
"kron": {
|
|
877
|
+
"category": "counted_custom",
|
|
878
|
+
"module": "numpy",
|
|
879
|
+
"notes": "Kronecker product; cost proportional to output size.",
|
|
880
|
+
},
|
|
881
|
+
"cross": {
|
|
882
|
+
"category": "counted_custom",
|
|
883
|
+
"module": "numpy",
|
|
884
|
+
"notes": "Cross product of two 3-D vectors.",
|
|
885
|
+
},
|
|
886
|
+
"diff": {
|
|
887
|
+
"category": "counted_custom",
|
|
888
|
+
"module": "numpy",
|
|
889
|
+
"notes": "n-th discrete difference along axis.",
|
|
890
|
+
},
|
|
891
|
+
"gradient": {
|
|
892
|
+
"category": "counted_custom",
|
|
893
|
+
"module": "numpy",
|
|
894
|
+
"notes": "Gradient using central differences.",
|
|
895
|
+
},
|
|
896
|
+
"ediff1d": {
|
|
897
|
+
"category": "counted_custom",
|
|
898
|
+
"module": "numpy",
|
|
899
|
+
"notes": "Differences between consecutive elements.",
|
|
900
|
+
},
|
|
901
|
+
"convolve": {
|
|
902
|
+
"category": "counted_custom",
|
|
903
|
+
"module": "numpy",
|
|
904
|
+
"notes": "1-D discrete convolution.",
|
|
905
|
+
},
|
|
906
|
+
"correlate": {
|
|
907
|
+
"category": "counted_custom",
|
|
908
|
+
"module": "numpy",
|
|
909
|
+
"notes": "1-D cross-correlation.",
|
|
910
|
+
},
|
|
911
|
+
"corrcoef": {
|
|
912
|
+
"category": "counted_custom",
|
|
913
|
+
"module": "numpy",
|
|
914
|
+
"notes": "Pearson correlation coefficients.",
|
|
915
|
+
},
|
|
916
|
+
"cov": {
|
|
917
|
+
"category": "counted_custom",
|
|
918
|
+
"module": "numpy",
|
|
919
|
+
"notes": "Covariance matrix.",
|
|
920
|
+
},
|
|
921
|
+
"trapezoid": {
|
|
922
|
+
"category": "counted_custom",
|
|
923
|
+
"module": "numpy",
|
|
924
|
+
"notes": "Integrate using the trapezoidal rule.",
|
|
925
|
+
},
|
|
926
|
+
"trapz": {
|
|
927
|
+
"category": "counted_custom",
|
|
928
|
+
"module": "numpy",
|
|
929
|
+
"max_numpy": "2.4",
|
|
930
|
+
"notes": "Alias for trapezoid (deprecated). Removed in numpy 2.4; use `trapezoid` instead.",
|
|
931
|
+
},
|
|
932
|
+
"interp": {
|
|
933
|
+
"category": "counted_custom",
|
|
934
|
+
"module": "numpy",
|
|
935
|
+
"notes": "1-D linear interpolation.",
|
|
936
|
+
},
|
|
937
|
+
# ------------------------------------------------------------------
|
|
938
|
+
# linalg — svd + decompositions implemented; rest blacklisted
|
|
939
|
+
# ------------------------------------------------------------------
|
|
940
|
+
"linalg.svd": {
|
|
941
|
+
"category": "counted_custom",
|
|
942
|
+
"module": "numpy.linalg",
|
|
943
|
+
"notes": "Singular value decomposition; cost ~ O(min(m,n)*m*n).",
|
|
944
|
+
},
|
|
945
|
+
"linalg.cholesky": {
|
|
946
|
+
"category": "counted_custom",
|
|
947
|
+
"module": "numpy.linalg",
|
|
948
|
+
"notes": "Cholesky decomposition. Cost: $n^3$.",
|
|
949
|
+
},
|
|
950
|
+
"linalg.cond": {
|
|
951
|
+
"category": "counted_custom",
|
|
952
|
+
"module": "numpy.linalg",
|
|
953
|
+
"notes": "Condition number. Cost: m*n*min(m,n) (via SVD).",
|
|
954
|
+
},
|
|
955
|
+
"linalg.cross": {
|
|
956
|
+
"category": "counted_custom",
|
|
957
|
+
"module": "numpy.linalg",
|
|
958
|
+
"notes": "Delegates to `fnp.cross` which charges `numel(output)` FLOPs.",
|
|
959
|
+
},
|
|
960
|
+
"linalg.det": {
|
|
961
|
+
"category": "counted_custom",
|
|
962
|
+
"module": "numpy.linalg",
|
|
963
|
+
"notes": "Determinant. Cost: $n^3$.",
|
|
964
|
+
},
|
|
965
|
+
"linalg.diagonal": {
|
|
966
|
+
"category": "free",
|
|
967
|
+
"module": "numpy.linalg",
|
|
968
|
+
"notes": "View of diagonal — delegates to flopscope.diagonal. Cost: 0 FLOPs.",
|
|
969
|
+
},
|
|
970
|
+
"linalg.eig": {
|
|
971
|
+
"category": "counted_custom",
|
|
972
|
+
"module": "numpy.linalg",
|
|
973
|
+
"notes": "Eigendecomposition. Cost: $n^3$.",
|
|
974
|
+
},
|
|
975
|
+
"linalg.eigh": {
|
|
976
|
+
"category": "counted_custom",
|
|
977
|
+
"module": "numpy.linalg",
|
|
978
|
+
"notes": "Symmetric eigendecomposition. Cost: $n^3$.",
|
|
979
|
+
},
|
|
980
|
+
"linalg.eigvals": {
|
|
981
|
+
"category": "counted_custom",
|
|
982
|
+
"module": "numpy.linalg",
|
|
983
|
+
"notes": "Eigenvalues only. Cost: $n^3$.",
|
|
984
|
+
},
|
|
985
|
+
"linalg.eigvalsh": {
|
|
986
|
+
"category": "counted_custom",
|
|
987
|
+
"module": "numpy.linalg",
|
|
988
|
+
"notes": "Symmetric eigenvalues. Cost: $n^3$.",
|
|
989
|
+
},
|
|
990
|
+
"linalg.inv": {
|
|
991
|
+
"category": "counted_custom",
|
|
992
|
+
"module": "numpy.linalg",
|
|
993
|
+
"notes": "Matrix inverse. Cost: $n^3$ (LU + solve).",
|
|
994
|
+
},
|
|
995
|
+
"linalg.lstsq": {
|
|
996
|
+
"category": "counted_custom",
|
|
997
|
+
"module": "numpy.linalg",
|
|
998
|
+
"notes": "Least squares. Cost: m*n*min(m,n) (LAPACK gelsd/SVD).",
|
|
999
|
+
},
|
|
1000
|
+
"linalg.matmul": {
|
|
1001
|
+
"category": "counted_custom",
|
|
1002
|
+
"module": "numpy.linalg",
|
|
1003
|
+
"notes": "Delegates to `fnp.matmul` which charges `m*k*n` FLOPs (weight-calibrated).",
|
|
1004
|
+
},
|
|
1005
|
+
"linalg.matrix_norm": {
|
|
1006
|
+
"category": "counted_custom",
|
|
1007
|
+
"module": "numpy.linalg",
|
|
1008
|
+
"notes": "Matrix norm. Cost depends on ord: 2*numel for Frobenius, m*n*min(m,n) for ord=2.",
|
|
1009
|
+
},
|
|
1010
|
+
"linalg.matrix_power": {
|
|
1011
|
+
"category": "counted_custom",
|
|
1012
|
+
"module": "numpy.linalg",
|
|
1013
|
+
"notes": "Matrix power. Cost: $(\\lfloor\\log_2 k\\rfloor + \\text{popcount}(k) - 1) \\cdot n^3$ (exponentiation by squaring).",
|
|
1014
|
+
},
|
|
1015
|
+
"linalg.matrix_rank": {
|
|
1016
|
+
"category": "counted_custom",
|
|
1017
|
+
"module": "numpy.linalg",
|
|
1018
|
+
"notes": "Matrix rank. Cost: m*n*min(m,n) (via SVD).",
|
|
1019
|
+
},
|
|
1020
|
+
"linalg.matrix_transpose": {
|
|
1021
|
+
"category": "free",
|
|
1022
|
+
"module": "numpy.linalg",
|
|
1023
|
+
"notes": "Transpose view — delegates to flopscope.matrix_transpose. Cost: 0 FLOPs.",
|
|
1024
|
+
},
|
|
1025
|
+
"linalg.multi_dot": {
|
|
1026
|
+
"category": "counted_custom",
|
|
1027
|
+
"module": "numpy.linalg",
|
|
1028
|
+
"notes": "Chain matmul. Cost: sum of optimal chain matmul costs (CLRS §15.2).",
|
|
1029
|
+
},
|
|
1030
|
+
"linalg.norm": {
|
|
1031
|
+
"category": "counted_custom",
|
|
1032
|
+
"module": "numpy.linalg",
|
|
1033
|
+
"notes": "Norm. Cost depends on ord: numel for L1/inf, 2*numel for Frobenius, m*n*min(m,n) for ord=2.",
|
|
1034
|
+
},
|
|
1035
|
+
"linalg.outer": {
|
|
1036
|
+
"category": "counted_custom",
|
|
1037
|
+
"module": "numpy.linalg",
|
|
1038
|
+
"notes": "Delegates to `fnp.outer` which charges `m*n` FLOPs.",
|
|
1039
|
+
},
|
|
1040
|
+
"linalg.pinv": {
|
|
1041
|
+
"category": "counted_custom",
|
|
1042
|
+
"module": "numpy.linalg",
|
|
1043
|
+
"notes": "Pseudoinverse. Cost: m*n*min(m,n) (via SVD).",
|
|
1044
|
+
},
|
|
1045
|
+
"linalg.qr": {
|
|
1046
|
+
"category": "counted_custom",
|
|
1047
|
+
"module": "numpy.linalg",
|
|
1048
|
+
"notes": "QR decomposition. Cost: $m \\cdot n \\cdot \\min(m,n)$.",
|
|
1049
|
+
},
|
|
1050
|
+
"linalg.slogdet": {
|
|
1051
|
+
"category": "counted_custom",
|
|
1052
|
+
"module": "numpy.linalg",
|
|
1053
|
+
"notes": "Sign + log determinant. Cost: $n^3$.",
|
|
1054
|
+
},
|
|
1055
|
+
"linalg.solve": {
|
|
1056
|
+
"category": "counted_custom",
|
|
1057
|
+
"module": "numpy.linalg",
|
|
1058
|
+
"notes": "Solve Ax=b. Cost: $n^3$.",
|
|
1059
|
+
},
|
|
1060
|
+
"linalg.svdvals": {
|
|
1061
|
+
"category": "counted_custom",
|
|
1062
|
+
"module": "numpy.linalg",
|
|
1063
|
+
"notes": "Singular values only. Cost: m*n*min(m,n) (Golub-Reinsch).",
|
|
1064
|
+
},
|
|
1065
|
+
"linalg.tensordot": {
|
|
1066
|
+
"category": "counted_custom",
|
|
1067
|
+
"module": "numpy.linalg",
|
|
1068
|
+
"notes": "Delegates to `fnp.tensordot` which charges FLOPs based on contraction.",
|
|
1069
|
+
},
|
|
1070
|
+
"linalg.tensorinv": {
|
|
1071
|
+
"category": "counted_custom",
|
|
1072
|
+
"module": "numpy.linalg",
|
|
1073
|
+
"notes": "Tensor inverse. Cost: $n^3$ after reshape (delegates to inv).",
|
|
1074
|
+
},
|
|
1075
|
+
"linalg.tensorsolve": {
|
|
1076
|
+
"category": "counted_custom",
|
|
1077
|
+
"module": "numpy.linalg",
|
|
1078
|
+
"notes": "Tensor solve. Cost: $n^3$ after reshape (delegates to solve).",
|
|
1079
|
+
},
|
|
1080
|
+
"linalg.trace": {
|
|
1081
|
+
"category": "counted_custom",
|
|
1082
|
+
"module": "numpy.linalg",
|
|
1083
|
+
"notes": "Matrix trace. Cost: n (sum of diagonal elements).",
|
|
1084
|
+
},
|
|
1085
|
+
"linalg.vecdot": {
|
|
1086
|
+
"category": "counted_custom",
|
|
1087
|
+
"module": "numpy.linalg",
|
|
1088
|
+
"notes": "Delegates to `fnp.vecdot` which charges `2*n` FLOPs.",
|
|
1089
|
+
},
|
|
1090
|
+
"linalg.vector_norm": {
|
|
1091
|
+
"category": "counted_custom",
|
|
1092
|
+
"module": "numpy.linalg",
|
|
1093
|
+
"notes": "Vector norm. Cost: numel (or 2*numel for general p-norm).",
|
|
1094
|
+
},
|
|
1095
|
+
# ------------------------------------------------------------------
|
|
1096
|
+
# fft — counted_custom (14 transforms) + free (4 utility ops)
|
|
1097
|
+
# ------------------------------------------------------------------
|
|
1098
|
+
"fft.fft": {
|
|
1099
|
+
"category": "counted_custom",
|
|
1100
|
+
"module": "numpy.fft",
|
|
1101
|
+
"notes": "1-D complex FFT. Cost: 5*n*ceil(log2(n)) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1102
|
+
},
|
|
1103
|
+
"fft.fft2": {
|
|
1104
|
+
"category": "counted_custom",
|
|
1105
|
+
"module": "numpy.fft",
|
|
1106
|
+
"notes": "2-D complex FFT. Cost: 5*N*ceil(log2(N)), N=prod(s) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1107
|
+
},
|
|
1108
|
+
"fft.fftn": {
|
|
1109
|
+
"category": "counted_custom",
|
|
1110
|
+
"module": "numpy.fft",
|
|
1111
|
+
"notes": "N-D complex FFT. Cost: 5*N*ceil(log2(N)), N=prod(s) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1112
|
+
},
|
|
1113
|
+
"fft.fftfreq": {
|
|
1114
|
+
"category": "free",
|
|
1115
|
+
"module": "numpy.fft",
|
|
1116
|
+
"notes": "FFT sample frequencies. No arithmetic; returns index array.",
|
|
1117
|
+
},
|
|
1118
|
+
"fft.fftshift": {
|
|
1119
|
+
"category": "free",
|
|
1120
|
+
"module": "numpy.fft",
|
|
1121
|
+
"notes": "Shift zero-frequency component to center. No arithmetic; index reordering only.",
|
|
1122
|
+
},
|
|
1123
|
+
"fft.hfft": {
|
|
1124
|
+
"category": "counted_custom",
|
|
1125
|
+
"module": "numpy.fft",
|
|
1126
|
+
"notes": "FFT of Hermitian-symmetric signal. Cost: 5*n_out*ceil(log2(n_out)) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1127
|
+
},
|
|
1128
|
+
"fft.ifft": {
|
|
1129
|
+
"category": "counted_custom",
|
|
1130
|
+
"module": "numpy.fft",
|
|
1131
|
+
"notes": "Inverse 1-D complex FFT. Cost: 5*n*ceil(log2(n)) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1132
|
+
},
|
|
1133
|
+
"fft.ifft2": {
|
|
1134
|
+
"category": "counted_custom",
|
|
1135
|
+
"module": "numpy.fft",
|
|
1136
|
+
"notes": "Inverse 2-D complex FFT. Cost: 5*N*ceil(log2(N)), N=prod(s) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1137
|
+
},
|
|
1138
|
+
"fft.ifftn": {
|
|
1139
|
+
"category": "counted_custom",
|
|
1140
|
+
"module": "numpy.fft",
|
|
1141
|
+
"notes": "Inverse N-D complex FFT. Cost: 5*N*ceil(log2(N)), N=prod(s) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1142
|
+
},
|
|
1143
|
+
"fft.ifftshift": {
|
|
1144
|
+
"category": "free",
|
|
1145
|
+
"module": "numpy.fft",
|
|
1146
|
+
"notes": "Inverse of fftshift. No arithmetic; index reordering only.",
|
|
1147
|
+
},
|
|
1148
|
+
"fft.ihfft": {
|
|
1149
|
+
"category": "counted_custom",
|
|
1150
|
+
"module": "numpy.fft",
|
|
1151
|
+
"notes": "Inverse FFT of Hermitian signal. Cost: 5*n*ceil(log2(n)) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1152
|
+
},
|
|
1153
|
+
"fft.irfft": {
|
|
1154
|
+
"category": "counted_custom",
|
|
1155
|
+
"module": "numpy.fft",
|
|
1156
|
+
"notes": "Inverse 1-D real FFT. Cost: 5*(n//2)*ceil(log2(n)) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1157
|
+
},
|
|
1158
|
+
"fft.irfft2": {
|
|
1159
|
+
"category": "counted_custom",
|
|
1160
|
+
"module": "numpy.fft",
|
|
1161
|
+
"notes": "Inverse 2-D real FFT. Cost: 5*(N//2)*ceil(log2(N)), N=prod(s) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1162
|
+
},
|
|
1163
|
+
"fft.irfftn": {
|
|
1164
|
+
"category": "counted_custom",
|
|
1165
|
+
"module": "numpy.fft",
|
|
1166
|
+
"notes": "Inverse N-D real FFT. Cost: 5*(N//2)*ceil(log2(N)), N=prod(s) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1167
|
+
},
|
|
1168
|
+
"fft.rfft": {
|
|
1169
|
+
"category": "counted_custom",
|
|
1170
|
+
"module": "numpy.fft",
|
|
1171
|
+
"notes": "1-D real FFT. Cost: 5*(n//2)*ceil(log2(n)) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1172
|
+
},
|
|
1173
|
+
"fft.rfft2": {
|
|
1174
|
+
"category": "counted_custom",
|
|
1175
|
+
"module": "numpy.fft",
|
|
1176
|
+
"notes": "2-D real FFT. Cost: 5*(N//2)*ceil(log2(N)), N=prod(s) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1177
|
+
},
|
|
1178
|
+
"fft.rfftfreq": {
|
|
1179
|
+
"category": "free",
|
|
1180
|
+
"module": "numpy.fft",
|
|
1181
|
+
"notes": "Real FFT sample frequencies. No arithmetic; returns index array.",
|
|
1182
|
+
},
|
|
1183
|
+
"fft.rfftn": {
|
|
1184
|
+
"category": "counted_custom",
|
|
1185
|
+
"module": "numpy.fft",
|
|
1186
|
+
"notes": "N-D real FFT. Cost: 5*(N//2)*ceil(log2(N)), N=prod(s) (Cooley-Tukey radix-2; Van Loan 1992 §1.4).",
|
|
1187
|
+
},
|
|
1188
|
+
# ------------------------------------------------------------------
|
|
1189
|
+
# free — implemented in _free_ops.py
|
|
1190
|
+
# ------------------------------------------------------------------
|
|
1191
|
+
"array": {
|
|
1192
|
+
"category": "counted_custom",
|
|
1193
|
+
"module": "numpy",
|
|
1194
|
+
"notes": "Create array from data. Cost: numel(input).",
|
|
1195
|
+
},
|
|
1196
|
+
"zeros": {
|
|
1197
|
+
"category": "free",
|
|
1198
|
+
"module": "numpy",
|
|
1199
|
+
"notes": "Create zero-filled array.",
|
|
1200
|
+
},
|
|
1201
|
+
"ones": {
|
|
1202
|
+
"category": "free",
|
|
1203
|
+
"module": "numpy",
|
|
1204
|
+
"notes": "Create one-filled array.",
|
|
1205
|
+
},
|
|
1206
|
+
"full": {
|
|
1207
|
+
"category": "counted_custom",
|
|
1208
|
+
"module": "numpy",
|
|
1209
|
+
"notes": "Create array filled with scalar value. Cost: num copied.",
|
|
1210
|
+
},
|
|
1211
|
+
"eye": {
|
|
1212
|
+
"category": "free",
|
|
1213
|
+
"module": "numpy",
|
|
1214
|
+
"notes": "Create identity matrix.",
|
|
1215
|
+
},
|
|
1216
|
+
"identity": {
|
|
1217
|
+
"category": "free",
|
|
1218
|
+
"module": "numpy",
|
|
1219
|
+
"notes": "Create square identity matrix.",
|
|
1220
|
+
},
|
|
1221
|
+
"diag": {
|
|
1222
|
+
"category": "counted_custom",
|
|
1223
|
+
"module": "numpy",
|
|
1224
|
+
"notes": "Extract diagonal or construct diagonal array. Cost: len(diagonal).",
|
|
1225
|
+
},
|
|
1226
|
+
"arange": {
|
|
1227
|
+
"category": "counted_custom",
|
|
1228
|
+
"module": "numpy",
|
|
1229
|
+
"notes": "Return evenly spaced values in given interval. Cost: numel(output).",
|
|
1230
|
+
},
|
|
1231
|
+
"linspace": {
|
|
1232
|
+
"category": "counted_custom",
|
|
1233
|
+
"module": "numpy",
|
|
1234
|
+
"notes": "Return evenly spaced numbers over interval. Cost: numel(output).",
|
|
1235
|
+
},
|
|
1236
|
+
"zeros_like": {
|
|
1237
|
+
"category": "free",
|
|
1238
|
+
"module": "numpy",
|
|
1239
|
+
"notes": "Array of zeros with same shape/type as input.",
|
|
1240
|
+
},
|
|
1241
|
+
"ones_like": {
|
|
1242
|
+
"category": "free",
|
|
1243
|
+
"module": "numpy",
|
|
1244
|
+
"notes": "Array of ones with same shape/type as input.",
|
|
1245
|
+
},
|
|
1246
|
+
"full_like": {
|
|
1247
|
+
"category": "counted_custom",
|
|
1248
|
+
"module": "numpy",
|
|
1249
|
+
"notes": "Array filled with scalar, same shape/type as input. Cost: numel(output).",
|
|
1250
|
+
},
|
|
1251
|
+
"empty": {
|
|
1252
|
+
"category": "free",
|
|
1253
|
+
"module": "numpy",
|
|
1254
|
+
"notes": "Uninitialized array allocation.",
|
|
1255
|
+
},
|
|
1256
|
+
"empty_like": {
|
|
1257
|
+
"category": "free",
|
|
1258
|
+
"module": "numpy",
|
|
1259
|
+
"notes": "Uninitialized array with same shape/type as input.",
|
|
1260
|
+
},
|
|
1261
|
+
"reshape": {
|
|
1262
|
+
"category": "free",
|
|
1263
|
+
"module": "numpy",
|
|
1264
|
+
"notes": "Reshape array without copying.",
|
|
1265
|
+
},
|
|
1266
|
+
"transpose": {
|
|
1267
|
+
"category": "free",
|
|
1268
|
+
"module": "numpy",
|
|
1269
|
+
"notes": "Permute array dimensions.",
|
|
1270
|
+
},
|
|
1271
|
+
"swapaxes": {
|
|
1272
|
+
"category": "free",
|
|
1273
|
+
"module": "numpy",
|
|
1274
|
+
"notes": "Interchange two axes of an array.",
|
|
1275
|
+
},
|
|
1276
|
+
"moveaxis": {
|
|
1277
|
+
"category": "free",
|
|
1278
|
+
"module": "numpy",
|
|
1279
|
+
"notes": "Move axes to new positions.",
|
|
1280
|
+
},
|
|
1281
|
+
"concatenate": {
|
|
1282
|
+
"category": "counted_custom",
|
|
1283
|
+
"module": "numpy",
|
|
1284
|
+
"notes": "Join arrays along axis. Cost: numel(output).",
|
|
1285
|
+
},
|
|
1286
|
+
"stack": {
|
|
1287
|
+
"category": "counted_custom",
|
|
1288
|
+
"module": "numpy",
|
|
1289
|
+
"notes": "Join arrays along new axis. Cost: numel(output).",
|
|
1290
|
+
},
|
|
1291
|
+
"vstack": {
|
|
1292
|
+
"category": "counted_custom",
|
|
1293
|
+
"module": "numpy",
|
|
1294
|
+
"notes": "Stack arrays vertically. Cost: numel(output).",
|
|
1295
|
+
},
|
|
1296
|
+
"hstack": {
|
|
1297
|
+
"category": "free",
|
|
1298
|
+
"module": "numpy",
|
|
1299
|
+
"notes": "Stack arrays horizontally.",
|
|
1300
|
+
},
|
|
1301
|
+
"split": {
|
|
1302
|
+
"category": "free",
|
|
1303
|
+
"module": "numpy",
|
|
1304
|
+
"notes": "Split array into sub-arrays. Cost: numel(output).",
|
|
1305
|
+
},
|
|
1306
|
+
"hsplit": {
|
|
1307
|
+
"category": "free",
|
|
1308
|
+
"module": "numpy",
|
|
1309
|
+
"notes": "Split array into columns.",
|
|
1310
|
+
},
|
|
1311
|
+
"vsplit": {
|
|
1312
|
+
"category": "free",
|
|
1313
|
+
"module": "numpy",
|
|
1314
|
+
"notes": "Split array into rows. Cost: numel(output).",
|
|
1315
|
+
},
|
|
1316
|
+
"squeeze": {
|
|
1317
|
+
"category": "free",
|
|
1318
|
+
"module": "numpy",
|
|
1319
|
+
"notes": "Remove size-1 dimensions.",
|
|
1320
|
+
},
|
|
1321
|
+
"expand_dims": {
|
|
1322
|
+
"category": "free",
|
|
1323
|
+
"module": "numpy",
|
|
1324
|
+
"notes": "Insert new size-1 axis.",
|
|
1325
|
+
},
|
|
1326
|
+
"ravel": {
|
|
1327
|
+
"category": "free",
|
|
1328
|
+
"module": "numpy",
|
|
1329
|
+
"notes": "Return contiguous flattened array. Cost: numel(input).",
|
|
1330
|
+
},
|
|
1331
|
+
"copy": {
|
|
1332
|
+
"category": "free",
|
|
1333
|
+
"module": "numpy",
|
|
1334
|
+
"notes": "Return array copy.",
|
|
1335
|
+
},
|
|
1336
|
+
"where": {
|
|
1337
|
+
"category": "counted_custom",
|
|
1338
|
+
"module": "numpy",
|
|
1339
|
+
"notes": "Select elements based on condition. Cost: numel(input).",
|
|
1340
|
+
},
|
|
1341
|
+
"tile": {
|
|
1342
|
+
"category": "counted_custom",
|
|
1343
|
+
"module": "numpy",
|
|
1344
|
+
"notes": "Repeat array by tiling. Cost: numel(output).",
|
|
1345
|
+
},
|
|
1346
|
+
"repeat": {
|
|
1347
|
+
"category": "counted_custom",
|
|
1348
|
+
"module": "numpy",
|
|
1349
|
+
"notes": "Repeat elements of an array. Cost: numel(output).",
|
|
1350
|
+
},
|
|
1351
|
+
"flip": {
|
|
1352
|
+
"category": "free",
|
|
1353
|
+
"module": "numpy",
|
|
1354
|
+
"notes": "Reverse order of elements along axis.",
|
|
1355
|
+
},
|
|
1356
|
+
"roll": {
|
|
1357
|
+
"category": "counted_custom",
|
|
1358
|
+
"module": "numpy",
|
|
1359
|
+
"notes": "Roll array elements along axis. Cost: numel(output).",
|
|
1360
|
+
},
|
|
1361
|
+
"sort": {
|
|
1362
|
+
"category": "counted_custom",
|
|
1363
|
+
"module": "numpy",
|
|
1364
|
+
"notes": "Comparison sort; cost = n*ceil(log2(n)) per slice.",
|
|
1365
|
+
},
|
|
1366
|
+
"argsort": {
|
|
1367
|
+
"category": "counted_custom",
|
|
1368
|
+
"module": "numpy",
|
|
1369
|
+
"notes": "Indirect sort; cost = n*ceil(log2(n)) per slice.",
|
|
1370
|
+
},
|
|
1371
|
+
"searchsorted": {
|
|
1372
|
+
"category": "counted_custom",
|
|
1373
|
+
"module": "numpy",
|
|
1374
|
+
"notes": "Binary search; cost = m*ceil(log2(n)).",
|
|
1375
|
+
},
|
|
1376
|
+
"unique": {
|
|
1377
|
+
"category": "counted_custom",
|
|
1378
|
+
"module": "numpy",
|
|
1379
|
+
"notes": "Sort-based unique; cost = n*ceil(log2(n)).",
|
|
1380
|
+
},
|
|
1381
|
+
"pad": {
|
|
1382
|
+
"category": "counted_custom",
|
|
1383
|
+
"module": "numpy",
|
|
1384
|
+
"notes": "Pad array. Cost: numel(output).",
|
|
1385
|
+
},
|
|
1386
|
+
"triu": {
|
|
1387
|
+
"category": "free",
|
|
1388
|
+
"module": "numpy",
|
|
1389
|
+
"notes": "Upper triangle of array.",
|
|
1390
|
+
},
|
|
1391
|
+
"tril": {
|
|
1392
|
+
"category": "free",
|
|
1393
|
+
"module": "numpy",
|
|
1394
|
+
"notes": "Lower triangle of array.",
|
|
1395
|
+
},
|
|
1396
|
+
"diagonal": {
|
|
1397
|
+
"category": "counted_custom",
|
|
1398
|
+
"module": "numpy",
|
|
1399
|
+
"notes": "Return specified diagonals. Cost: numel(input).",
|
|
1400
|
+
},
|
|
1401
|
+
"trace": {
|
|
1402
|
+
"category": "counted_custom",
|
|
1403
|
+
"module": "numpy",
|
|
1404
|
+
"notes": "Diagonal sum; cost = min(n,m).",
|
|
1405
|
+
},
|
|
1406
|
+
"broadcast_to": {
|
|
1407
|
+
"category": "free",
|
|
1408
|
+
"module": "numpy",
|
|
1409
|
+
"notes": "Broadcast array to new shape. Cost: numel(output).",
|
|
1410
|
+
},
|
|
1411
|
+
"meshgrid": {
|
|
1412
|
+
"category": "counted_custom",
|
|
1413
|
+
"module": "numpy",
|
|
1414
|
+
"notes": "Coordinate matrices from coordinate vectors. Cost: numel(output).",
|
|
1415
|
+
},
|
|
1416
|
+
"astype": {
|
|
1417
|
+
"category": "free",
|
|
1418
|
+
"module": "numpy",
|
|
1419
|
+
"notes": "Cast array to specified type.",
|
|
1420
|
+
},
|
|
1421
|
+
"asarray": {
|
|
1422
|
+
"category": "free",
|
|
1423
|
+
"module": "numpy",
|
|
1424
|
+
"notes": "Convert input to array. Cost: numel(input).",
|
|
1425
|
+
},
|
|
1426
|
+
"isnan": {
|
|
1427
|
+
"category": "counted_custom",
|
|
1428
|
+
"module": "numpy",
|
|
1429
|
+
"notes": "Test for NaN element-wise. Cost: numel(input).",
|
|
1430
|
+
},
|
|
1431
|
+
"isinf": {
|
|
1432
|
+
"category": "counted_custom",
|
|
1433
|
+
"module": "numpy",
|
|
1434
|
+
"notes": "Test for infinity element-wise. Cost: numel(input).",
|
|
1435
|
+
},
|
|
1436
|
+
"isfinite": {
|
|
1437
|
+
"category": "counted_custom",
|
|
1438
|
+
"module": "numpy",
|
|
1439
|
+
"notes": "Test for finite values element-wise. Cost: numel(input).",
|
|
1440
|
+
},
|
|
1441
|
+
"allclose": {
|
|
1442
|
+
"category": "counted_custom",
|
|
1443
|
+
"module": "numpy",
|
|
1444
|
+
"notes": "Element-wise tolerance check; cost = numel(a).",
|
|
1445
|
+
},
|
|
1446
|
+
# Additional free ops
|
|
1447
|
+
"rot90": {
|
|
1448
|
+
"category": "free",
|
|
1449
|
+
"module": "numpy",
|
|
1450
|
+
"notes": "Rotate array 90 degrees.",
|
|
1451
|
+
},
|
|
1452
|
+
"fliplr": {
|
|
1453
|
+
"category": "free",
|
|
1454
|
+
"module": "numpy",
|
|
1455
|
+
"notes": "Flip array left-right.",
|
|
1456
|
+
},
|
|
1457
|
+
"flipud": {
|
|
1458
|
+
"category": "free",
|
|
1459
|
+
"module": "numpy",
|
|
1460
|
+
"notes": "Flip array up-down.",
|
|
1461
|
+
},
|
|
1462
|
+
"atleast_1d": {
|
|
1463
|
+
"category": "free",
|
|
1464
|
+
"module": "numpy",
|
|
1465
|
+
"notes": "View inputs as arrays with at least one dimension.",
|
|
1466
|
+
},
|
|
1467
|
+
"atleast_2d": {
|
|
1468
|
+
"category": "free",
|
|
1469
|
+
"module": "numpy",
|
|
1470
|
+
"notes": "View inputs as arrays with at least two dimensions.",
|
|
1471
|
+
},
|
|
1472
|
+
"atleast_3d": {
|
|
1473
|
+
"category": "free",
|
|
1474
|
+
"module": "numpy",
|
|
1475
|
+
"notes": "View inputs as arrays with at least three dimensions.",
|
|
1476
|
+
},
|
|
1477
|
+
"column_stack": {
|
|
1478
|
+
"category": "free",
|
|
1479
|
+
"module": "numpy",
|
|
1480
|
+
"notes": "Stack 1-D arrays as columns into 2-D array.",
|
|
1481
|
+
},
|
|
1482
|
+
"dstack": {
|
|
1483
|
+
"category": "counted_custom",
|
|
1484
|
+
"module": "numpy",
|
|
1485
|
+
"notes": "Stack arrays depth-wise (along third axis). Cost: numel(output).",
|
|
1486
|
+
},
|
|
1487
|
+
"row_stack": {
|
|
1488
|
+
"category": "free",
|
|
1489
|
+
"module": "numpy",
|
|
1490
|
+
"notes": "Stack arrays vertically (alias for vstack).",
|
|
1491
|
+
},
|
|
1492
|
+
"flatnonzero": {
|
|
1493
|
+
"category": "counted_custom",
|
|
1494
|
+
"module": "numpy",
|
|
1495
|
+
"notes": "Return indices of non-zero elements in flattened array. Cost: numel(input).",
|
|
1496
|
+
},
|
|
1497
|
+
"nonzero": {
|
|
1498
|
+
"category": "counted_custom",
|
|
1499
|
+
"module": "numpy",
|
|
1500
|
+
"notes": "Return indices of non-zero elements. Cost: numel(input).",
|
|
1501
|
+
},
|
|
1502
|
+
"argwhere": {
|
|
1503
|
+
"category": "counted_custom",
|
|
1504
|
+
"module": "numpy",
|
|
1505
|
+
"notes": "Find indices of non-zero elements. Cost: numel(input).",
|
|
1506
|
+
},
|
|
1507
|
+
"isin": {
|
|
1508
|
+
"category": "counted_custom",
|
|
1509
|
+
"module": "numpy",
|
|
1510
|
+
"notes": "Set membership; cost = (n+m)*ceil(log2(n+m)).",
|
|
1511
|
+
},
|
|
1512
|
+
"in1d": {
|
|
1513
|
+
"category": "counted_custom",
|
|
1514
|
+
"module": "numpy",
|
|
1515
|
+
"max_numpy": "2.4",
|
|
1516
|
+
"notes": "Set membership; cost = (n+m)*ceil(log2(n+m)). Removed in numpy 2.4; use `isin` instead.",
|
|
1517
|
+
},
|
|
1518
|
+
"select": {
|
|
1519
|
+
"category": "counted_custom",
|
|
1520
|
+
"module": "numpy",
|
|
1521
|
+
"notes": "Return array from list of choices based on conditions. Cost: numel(input).",
|
|
1522
|
+
},
|
|
1523
|
+
"extract": {
|
|
1524
|
+
"category": "counted_custom",
|
|
1525
|
+
"module": "numpy",
|
|
1526
|
+
"notes": "Return elements satisfying condition. Cost: numel(input).",
|
|
1527
|
+
},
|
|
1528
|
+
"place": {
|
|
1529
|
+
"category": "counted_custom",
|
|
1530
|
+
"module": "numpy",
|
|
1531
|
+
"notes": "Change elements satisfying condition. Cost: numel(input).",
|
|
1532
|
+
},
|
|
1533
|
+
"put": {
|
|
1534
|
+
"category": "counted_custom",
|
|
1535
|
+
"module": "numpy",
|
|
1536
|
+
"notes": "Replace elements at given flat indices. Cost: numel(input).",
|
|
1537
|
+
},
|
|
1538
|
+
"put_along_axis": {
|
|
1539
|
+
"category": "counted_custom",
|
|
1540
|
+
"module": "numpy",
|
|
1541
|
+
"notes": "Put values into destination array using indices. Cost: numel(input).",
|
|
1542
|
+
},
|
|
1543
|
+
"putmask": {
|
|
1544
|
+
"category": "counted_custom",
|
|
1545
|
+
"module": "numpy",
|
|
1546
|
+
"notes": "Change elements of array based on condition and input values. Cost: numel(input).",
|
|
1547
|
+
},
|
|
1548
|
+
"take": {
|
|
1549
|
+
"category": "counted_custom",
|
|
1550
|
+
"module": "numpy",
|
|
1551
|
+
"notes": "Take elements from array along axis. Cost: numel(output).",
|
|
1552
|
+
},
|
|
1553
|
+
"take_along_axis": {
|
|
1554
|
+
"category": "counted_custom",
|
|
1555
|
+
"module": "numpy",
|
|
1556
|
+
"notes": "Take values from input array by matching 1-D index. Cost: numel(output).",
|
|
1557
|
+
},
|
|
1558
|
+
"choose": {
|
|
1559
|
+
"category": "counted_custom",
|
|
1560
|
+
"module": "numpy",
|
|
1561
|
+
"notes": "Construct array from index array and choices. Cost: numel(output).",
|
|
1562
|
+
},
|
|
1563
|
+
"compress": {
|
|
1564
|
+
"category": "counted_custom",
|
|
1565
|
+
"module": "numpy",
|
|
1566
|
+
"notes": "Return selected slices along axis. Cost: numel(input).",
|
|
1567
|
+
},
|
|
1568
|
+
"array_equal": {
|
|
1569
|
+
"category": "counted_custom",
|
|
1570
|
+
"module": "numpy",
|
|
1571
|
+
"notes": "Element-wise equality; cost = numel(a).",
|
|
1572
|
+
},
|
|
1573
|
+
"array_equiv": {
|
|
1574
|
+
"category": "counted_custom",
|
|
1575
|
+
"module": "numpy",
|
|
1576
|
+
"notes": "Element-wise equivalence; cost = numel(a).",
|
|
1577
|
+
},
|
|
1578
|
+
"shape": {
|
|
1579
|
+
"category": "free",
|
|
1580
|
+
"module": "numpy",
|
|
1581
|
+
"notes": "Return shape of array.",
|
|
1582
|
+
},
|
|
1583
|
+
"size": {
|
|
1584
|
+
"category": "free",
|
|
1585
|
+
"module": "numpy",
|
|
1586
|
+
"notes": "Return number of elements in array.",
|
|
1587
|
+
},
|
|
1588
|
+
"ndim": {
|
|
1589
|
+
"category": "free",
|
|
1590
|
+
"module": "numpy",
|
|
1591
|
+
"notes": "Return number of dimensions of array.",
|
|
1592
|
+
},
|
|
1593
|
+
"dsplit": {
|
|
1594
|
+
"category": "free",
|
|
1595
|
+
"module": "numpy",
|
|
1596
|
+
"notes": "Split array into multiple sub-arrays depth-wise. Cost: numel(output).",
|
|
1597
|
+
},
|
|
1598
|
+
"array_split": {
|
|
1599
|
+
"category": "free",
|
|
1600
|
+
"module": "numpy",
|
|
1601
|
+
"notes": "Split array into sub-arrays (possibly unequal). Cost: numel(output).",
|
|
1602
|
+
},
|
|
1603
|
+
"trim_zeros": {
|
|
1604
|
+
"category": "counted_custom",
|
|
1605
|
+
"module": "numpy",
|
|
1606
|
+
"notes": "Trim leading/trailing zeros from 1-D array. Cost: num trimmed.",
|
|
1607
|
+
},
|
|
1608
|
+
"resize": {
|
|
1609
|
+
"category": "counted_custom",
|
|
1610
|
+
"module": "numpy",
|
|
1611
|
+
"notes": "Return new array with given shape by repeating. Cost: numel(output).",
|
|
1612
|
+
},
|
|
1613
|
+
"broadcast_shapes": {
|
|
1614
|
+
"category": "free",
|
|
1615
|
+
"module": "numpy",
|
|
1616
|
+
"notes": "Compute broadcast shape from input shapes.",
|
|
1617
|
+
},
|
|
1618
|
+
"broadcast_arrays": {
|
|
1619
|
+
"category": "free",
|
|
1620
|
+
"module": "numpy",
|
|
1621
|
+
"notes": "Broadcast arrays against each other. Cost: numel(output).",
|
|
1622
|
+
},
|
|
1623
|
+
"result_type": {
|
|
1624
|
+
"category": "free",
|
|
1625
|
+
"module": "numpy",
|
|
1626
|
+
"notes": "Return type that results from applying NumPy type promotion.",
|
|
1627
|
+
},
|
|
1628
|
+
"can_cast": {
|
|
1629
|
+
"category": "free",
|
|
1630
|
+
"module": "numpy",
|
|
1631
|
+
"notes": "Returns True if cast is safe.",
|
|
1632
|
+
},
|
|
1633
|
+
"common_type": {
|
|
1634
|
+
"category": "free",
|
|
1635
|
+
"module": "numpy",
|
|
1636
|
+
"notes": "Return scalar type common to all input arrays.",
|
|
1637
|
+
},
|
|
1638
|
+
"min_scalar_type": {
|
|
1639
|
+
"category": "free",
|
|
1640
|
+
"module": "numpy",
|
|
1641
|
+
"notes": "Return the minimum scalar type for a value.",
|
|
1642
|
+
},
|
|
1643
|
+
"promote_types": {
|
|
1644
|
+
"category": "free",
|
|
1645
|
+
"module": "numpy",
|
|
1646
|
+
"notes": "Return smallest type to which both types may be safely cast.",
|
|
1647
|
+
},
|
|
1648
|
+
"shares_memory": {
|
|
1649
|
+
"category": "free",
|
|
1650
|
+
"module": "numpy",
|
|
1651
|
+
"notes": "Determine if two arrays share memory.",
|
|
1652
|
+
},
|
|
1653
|
+
"may_share_memory": {
|
|
1654
|
+
"category": "free",
|
|
1655
|
+
"module": "numpy",
|
|
1656
|
+
"notes": "Determine if two arrays might share memory.",
|
|
1657
|
+
},
|
|
1658
|
+
"packbits": {
|
|
1659
|
+
"category": "counted_custom",
|
|
1660
|
+
"module": "numpy",
|
|
1661
|
+
"notes": "Pack elements of array into bits. Cost: numel(input).",
|
|
1662
|
+
},
|
|
1663
|
+
"unpackbits": {
|
|
1664
|
+
"category": "counted_custom",
|
|
1665
|
+
"module": "numpy",
|
|
1666
|
+
"notes": "Unpack elements of array into bits. Cost: numel(input).",
|
|
1667
|
+
},
|
|
1668
|
+
"fromfunction": {
|
|
1669
|
+
"category": "counted_custom",
|
|
1670
|
+
"module": "numpy",
|
|
1671
|
+
"notes": "Construct array by executing function over each coordinate. Cost: numel(output).",
|
|
1672
|
+
},
|
|
1673
|
+
"fromiter": {
|
|
1674
|
+
"category": "counted_custom",
|
|
1675
|
+
"module": "numpy",
|
|
1676
|
+
"notes": "Create array from an iterable. Cost: numel(output).",
|
|
1677
|
+
},
|
|
1678
|
+
"frombuffer": {
|
|
1679
|
+
"category": "free",
|
|
1680
|
+
"module": "numpy",
|
|
1681
|
+
"notes": "Interpret buffer as 1-D array. Cost: numel(output).",
|
|
1682
|
+
},
|
|
1683
|
+
"fromstring": {
|
|
1684
|
+
"category": "blacklisted",
|
|
1685
|
+
"module": "numpy",
|
|
1686
|
+
"notes": "Create 1-D array from string data. Cost: numel(output).",
|
|
1687
|
+
},
|
|
1688
|
+
"fromfile": {
|
|
1689
|
+
"category": "blacklisted",
|
|
1690
|
+
"module": "numpy",
|
|
1691
|
+
"notes": "Construct array from binary/text file. Cost: numel(output).",
|
|
1692
|
+
},
|
|
1693
|
+
"fromregex": {
|
|
1694
|
+
"category": "blacklisted",
|
|
1695
|
+
"module": "numpy",
|
|
1696
|
+
"notes": "Construct array from text file using regex. Cost: numel(output).",
|
|
1697
|
+
},
|
|
1698
|
+
"from_dlpack": {
|
|
1699
|
+
"category": "free",
|
|
1700
|
+
"module": "numpy",
|
|
1701
|
+
"notes": "Create ndarray from DLPack object (zero-copy). Cost: numel(output).",
|
|
1702
|
+
},
|
|
1703
|
+
"block": {
|
|
1704
|
+
"category": "counted_custom",
|
|
1705
|
+
"module": "numpy",
|
|
1706
|
+
"notes": "Assemble ndarray from nested list of blocks. Cost: numel(output).",
|
|
1707
|
+
},
|
|
1708
|
+
"bmat": {
|
|
1709
|
+
"category": "counted_custom",
|
|
1710
|
+
"module": "numpy",
|
|
1711
|
+
"notes": "Build matrix from nested list of matrices. Cost: numel(output).",
|
|
1712
|
+
},
|
|
1713
|
+
"lexsort": {
|
|
1714
|
+
"category": "counted_custom",
|
|
1715
|
+
"module": "numpy",
|
|
1716
|
+
"notes": "Multi-key sort; cost = k*n*ceil(log2(n)).",
|
|
1717
|
+
},
|
|
1718
|
+
"partition": {
|
|
1719
|
+
"category": "counted_custom",
|
|
1720
|
+
"module": "numpy",
|
|
1721
|
+
"notes": "Quickselect; cost = n per slice.",
|
|
1722
|
+
},
|
|
1723
|
+
"argpartition": {
|
|
1724
|
+
"category": "counted_custom",
|
|
1725
|
+
"module": "numpy",
|
|
1726
|
+
"notes": "Indirect partition; cost = n per slice.",
|
|
1727
|
+
},
|
|
1728
|
+
"union1d": {
|
|
1729
|
+
"category": "counted_custom",
|
|
1730
|
+
"module": "numpy",
|
|
1731
|
+
"notes": "Set union; cost = (n+m)*ceil(log2(n+m)).",
|
|
1732
|
+
},
|
|
1733
|
+
"intersect1d": {
|
|
1734
|
+
"category": "counted_custom",
|
|
1735
|
+
"module": "numpy",
|
|
1736
|
+
"notes": "Set intersection; cost = (n+m)*ceil(log2(n+m)).",
|
|
1737
|
+
},
|
|
1738
|
+
"setdiff1d": {
|
|
1739
|
+
"category": "counted_custom",
|
|
1740
|
+
"module": "numpy",
|
|
1741
|
+
"notes": "Set difference; cost = (n+m)*ceil(log2(n+m)).",
|
|
1742
|
+
},
|
|
1743
|
+
"setxor1d": {
|
|
1744
|
+
"category": "counted_custom",
|
|
1745
|
+
"module": "numpy",
|
|
1746
|
+
"notes": "Symmetric set difference; cost = (n+m)*ceil(log2(n+m)).",
|
|
1747
|
+
},
|
|
1748
|
+
"histogram": {
|
|
1749
|
+
"category": "counted_custom",
|
|
1750
|
+
"module": "numpy",
|
|
1751
|
+
"notes": "Binning; cost = n*ceil(log2(bins)).",
|
|
1752
|
+
},
|
|
1753
|
+
"histogram2d": {
|
|
1754
|
+
"category": "counted_custom",
|
|
1755
|
+
"module": "numpy",
|
|
1756
|
+
"notes": "2D binning; cost = n*(ceil(log2(bx))+ceil(log2(by))).",
|
|
1757
|
+
},
|
|
1758
|
+
"histogramdd": {
|
|
1759
|
+
"category": "counted_custom",
|
|
1760
|
+
"module": "numpy",
|
|
1761
|
+
"notes": "ND binning; cost = n*sum(ceil(log2(b_i))).",
|
|
1762
|
+
},
|
|
1763
|
+
"histogram_bin_edges": {
|
|
1764
|
+
"category": "counted_custom",
|
|
1765
|
+
"module": "numpy",
|
|
1766
|
+
"notes": "Bin edge computation; cost = numel(a).",
|
|
1767
|
+
},
|
|
1768
|
+
"bincount": {
|
|
1769
|
+
"category": "counted_custom",
|
|
1770
|
+
"module": "numpy",
|
|
1771
|
+
"notes": "Integer counting; cost = numel(x).",
|
|
1772
|
+
},
|
|
1773
|
+
"digitize": {
|
|
1774
|
+
"category": "counted_custom",
|
|
1775
|
+
"module": "numpy",
|
|
1776
|
+
"notes": "Bin search; cost = n*ceil(log2(bins)).",
|
|
1777
|
+
},
|
|
1778
|
+
"unravel_index": {
|
|
1779
|
+
"category": "free",
|
|
1780
|
+
"module": "numpy",
|
|
1781
|
+
"notes": "Convert flat index to multi-dimensional index.",
|
|
1782
|
+
},
|
|
1783
|
+
"ravel_multi_index": {
|
|
1784
|
+
"category": "free",
|
|
1785
|
+
"module": "numpy",
|
|
1786
|
+
"notes": "Convert multi-dimensional index to flat index.",
|
|
1787
|
+
},
|
|
1788
|
+
"indices": {
|
|
1789
|
+
"category": "counted_custom",
|
|
1790
|
+
"module": "numpy",
|
|
1791
|
+
"notes": "Return array representing indices of a grid. Cost: numel(output).",
|
|
1792
|
+
},
|
|
1793
|
+
"diag_indices": {
|
|
1794
|
+
"category": "free",
|
|
1795
|
+
"module": "numpy",
|
|
1796
|
+
"notes": "Return indices to access main diagonal of n-D array.",
|
|
1797
|
+
},
|
|
1798
|
+
"diag_indices_from": {
|
|
1799
|
+
"category": "free",
|
|
1800
|
+
"module": "numpy",
|
|
1801
|
+
"notes": "Return indices to access main diagonal of given array.",
|
|
1802
|
+
},
|
|
1803
|
+
"diagflat": {
|
|
1804
|
+
"category": "counted_custom",
|
|
1805
|
+
"module": "numpy",
|
|
1806
|
+
"notes": "Create diagonal array from flattened input. Cost: len(v).",
|
|
1807
|
+
},
|
|
1808
|
+
"mask_indices": {
|
|
1809
|
+
"category": "counted_custom",
|
|
1810
|
+
"module": "numpy",
|
|
1811
|
+
"notes": "Return indices of mask for n x n array. Cost: numel(output).",
|
|
1812
|
+
},
|
|
1813
|
+
"tril_indices": {
|
|
1814
|
+
"category": "free",
|
|
1815
|
+
"module": "numpy",
|
|
1816
|
+
"notes": "Return lower-triangle indices for n x n array.",
|
|
1817
|
+
},
|
|
1818
|
+
"tril_indices_from": {
|
|
1819
|
+
"category": "free",
|
|
1820
|
+
"module": "numpy",
|
|
1821
|
+
"notes": "Return lower-triangle indices for given array.",
|
|
1822
|
+
},
|
|
1823
|
+
"triu_indices": {
|
|
1824
|
+
"category": "free",
|
|
1825
|
+
"module": "numpy",
|
|
1826
|
+
"notes": "Return upper-triangle indices for n x n array.",
|
|
1827
|
+
},
|
|
1828
|
+
"triu_indices_from": {
|
|
1829
|
+
"category": "free",
|
|
1830
|
+
"module": "numpy",
|
|
1831
|
+
"notes": "Return upper-triangle indices for given array.",
|
|
1832
|
+
},
|
|
1833
|
+
"fill_diagonal": {
|
|
1834
|
+
"category": "counted_custom",
|
|
1835
|
+
"module": "numpy",
|
|
1836
|
+
"notes": "Fill main diagonal of given array. Cost: min(m,n).",
|
|
1837
|
+
},
|
|
1838
|
+
"tri": {
|
|
1839
|
+
"category": "free",
|
|
1840
|
+
"module": "numpy",
|
|
1841
|
+
"notes": "Array with ones at and below given diagonal.",
|
|
1842
|
+
},
|
|
1843
|
+
"geomspace": {
|
|
1844
|
+
"category": "counted_custom",
|
|
1845
|
+
"module": "numpy",
|
|
1846
|
+
"notes": "Geometric-spaced generation; cost = num.",
|
|
1847
|
+
},
|
|
1848
|
+
"logspace": {
|
|
1849
|
+
"category": "counted_custom",
|
|
1850
|
+
"module": "numpy",
|
|
1851
|
+
"notes": "Log-spaced generation; cost = num.",
|
|
1852
|
+
},
|
|
1853
|
+
"concat": {
|
|
1854
|
+
"category": "counted_custom",
|
|
1855
|
+
"module": "numpy",
|
|
1856
|
+
"notes": "Join arrays along axis (NumPy 2.x array API alias for concatenate). Cost: numel(output).",
|
|
1857
|
+
},
|
|
1858
|
+
"vander": {
|
|
1859
|
+
"category": "counted_custom",
|
|
1860
|
+
"module": "numpy",
|
|
1861
|
+
"notes": "Vandermonde matrix; cost = len(x)*(N-1).",
|
|
1862
|
+
},
|
|
1863
|
+
"ix_": {
|
|
1864
|
+
"category": "counted_custom",
|
|
1865
|
+
"module": "numpy",
|
|
1866
|
+
"notes": "Construct open mesh from multiple sequences. Cost: numel(output).",
|
|
1867
|
+
},
|
|
1868
|
+
"rollaxis": {
|
|
1869
|
+
"category": "free",
|
|
1870
|
+
"module": "numpy",
|
|
1871
|
+
"notes": "Roll specified axis backwards. Cost: numel(output).",
|
|
1872
|
+
},
|
|
1873
|
+
"permute_dims": {
|
|
1874
|
+
"category": "free",
|
|
1875
|
+
"module": "numpy",
|
|
1876
|
+
"notes": "Permute dimensions (NumPy 2.x array API).",
|
|
1877
|
+
},
|
|
1878
|
+
"matrix_transpose": {
|
|
1879
|
+
"category": "free",
|
|
1880
|
+
"module": "numpy",
|
|
1881
|
+
"notes": "Transpose last two dimensions (NumPy 2.x array API).",
|
|
1882
|
+
},
|
|
1883
|
+
"unstack": {
|
|
1884
|
+
"category": "counted_custom",
|
|
1885
|
+
"module": "numpy",
|
|
1886
|
+
"min_numpy": "2.1",
|
|
1887
|
+
"notes": "Unstack array along axis into tuple of arrays (NumPy 2.x). Cost: numel(output).",
|
|
1888
|
+
},
|
|
1889
|
+
"delete": {
|
|
1890
|
+
"category": "counted_custom",
|
|
1891
|
+
"module": "numpy",
|
|
1892
|
+
"notes": "Return array with sub-arrays deleted along axis. Cost: num deleted.",
|
|
1893
|
+
},
|
|
1894
|
+
"insert": {
|
|
1895
|
+
"category": "counted_custom",
|
|
1896
|
+
"module": "numpy",
|
|
1897
|
+
"notes": "Insert values along axis before given indices. Cost: numel(values).",
|
|
1898
|
+
},
|
|
1899
|
+
"append": {
|
|
1900
|
+
"category": "counted_custom",
|
|
1901
|
+
"module": "numpy",
|
|
1902
|
+
"notes": "Append values to end of array. Cost: numel(values).",
|
|
1903
|
+
},
|
|
1904
|
+
"copyto": {
|
|
1905
|
+
"category": "counted_custom",
|
|
1906
|
+
"module": "numpy",
|
|
1907
|
+
"notes": "Copy values from src to dst array. Cost: num copied.",
|
|
1908
|
+
},
|
|
1909
|
+
"unique_all": {
|
|
1910
|
+
"category": "counted_custom",
|
|
1911
|
+
"module": "numpy",
|
|
1912
|
+
"notes": "Sort-based unique; cost = n*ceil(log2(n)).",
|
|
1913
|
+
},
|
|
1914
|
+
"unique_counts": {
|
|
1915
|
+
"category": "counted_custom",
|
|
1916
|
+
"module": "numpy",
|
|
1917
|
+
"notes": "Sort-based unique; cost = n*ceil(log2(n)).",
|
|
1918
|
+
},
|
|
1919
|
+
"unique_inverse": {
|
|
1920
|
+
"category": "counted_custom",
|
|
1921
|
+
"module": "numpy",
|
|
1922
|
+
"notes": "Sort-based unique; cost = n*ceil(log2(n)).",
|
|
1923
|
+
},
|
|
1924
|
+
"unique_values": {
|
|
1925
|
+
"category": "counted_custom",
|
|
1926
|
+
"module": "numpy",
|
|
1927
|
+
"notes": "Sort-based unique; cost = n*ceil(log2(n)).",
|
|
1928
|
+
},
|
|
1929
|
+
"asarray_chkfinite": {
|
|
1930
|
+
"category": "counted_custom",
|
|
1931
|
+
"module": "numpy",
|
|
1932
|
+
"notes": "Convert to array, raising if NaN or inf. Cost: numel(input).",
|
|
1933
|
+
},
|
|
1934
|
+
"require": {
|
|
1935
|
+
"category": "free",
|
|
1936
|
+
"module": "numpy",
|
|
1937
|
+
"notes": "Return array that satisfies requirements.",
|
|
1938
|
+
},
|
|
1939
|
+
"issubdtype": {
|
|
1940
|
+
"category": "free",
|
|
1941
|
+
"module": "numpy",
|
|
1942
|
+
"notes": "Return True if first argument is lower in type hierarchy.",
|
|
1943
|
+
},
|
|
1944
|
+
"isdtype": {
|
|
1945
|
+
"category": "free",
|
|
1946
|
+
"module": "numpy",
|
|
1947
|
+
"notes": "Return True if array or dtype is of specified kind (NumPy 2.x).",
|
|
1948
|
+
},
|
|
1949
|
+
"isscalar": {
|
|
1950
|
+
"category": "free",
|
|
1951
|
+
"module": "numpy",
|
|
1952
|
+
"notes": "Return True if input is a scalar.",
|
|
1953
|
+
},
|
|
1954
|
+
"isfortran": {
|
|
1955
|
+
"category": "free",
|
|
1956
|
+
"module": "numpy",
|
|
1957
|
+
"notes": "Return True if array is Fortran contiguous.",
|
|
1958
|
+
},
|
|
1959
|
+
"iterable": {
|
|
1960
|
+
"category": "free",
|
|
1961
|
+
"module": "numpy",
|
|
1962
|
+
"notes": "Return True if object is iterable.",
|
|
1963
|
+
},
|
|
1964
|
+
"typename": {
|
|
1965
|
+
"category": "free",
|
|
1966
|
+
"module": "numpy",
|
|
1967
|
+
"notes": "Return description of given data type code.",
|
|
1968
|
+
},
|
|
1969
|
+
"mintypecode": {
|
|
1970
|
+
"category": "free",
|
|
1971
|
+
"module": "numpy",
|
|
1972
|
+
"notes": "Return minimum data type character that can satisfy all given types.",
|
|
1973
|
+
},
|
|
1974
|
+
"base_repr": {
|
|
1975
|
+
"category": "blacklisted",
|
|
1976
|
+
"module": "numpy",
|
|
1977
|
+
"notes": "Return string representation of number in given base. Cost: numel(input).",
|
|
1978
|
+
},
|
|
1979
|
+
"binary_repr": {
|
|
1980
|
+
"category": "blacklisted",
|
|
1981
|
+
"module": "numpy",
|
|
1982
|
+
"notes": "Return binary string representation of the input number. Cost: numel(input).",
|
|
1983
|
+
},
|
|
1984
|
+
# ------------------------------------------------------------------
|
|
1985
|
+
# random — passthrough, category=free
|
|
1986
|
+
# ------------------------------------------------------------------
|
|
1987
|
+
"random.beta": {
|
|
1988
|
+
"category": "counted_custom",
|
|
1989
|
+
"module": "numpy.random",
|
|
1990
|
+
"notes": "Sampling; cost = numel(output).",
|
|
1991
|
+
},
|
|
1992
|
+
"random.binomial": {
|
|
1993
|
+
"category": "counted_custom",
|
|
1994
|
+
"module": "numpy.random",
|
|
1995
|
+
"notes": "Sampling; cost = numel(output).",
|
|
1996
|
+
},
|
|
1997
|
+
"random.bytes": {
|
|
1998
|
+
"category": "counted_custom",
|
|
1999
|
+
"module": "numpy.random",
|
|
2000
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2001
|
+
},
|
|
2002
|
+
"random.chisquare": {
|
|
2003
|
+
"category": "counted_custom",
|
|
2004
|
+
"module": "numpy.random",
|
|
2005
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2006
|
+
},
|
|
2007
|
+
"random.choice": {
|
|
2008
|
+
"category": "counted_custom",
|
|
2009
|
+
"module": "numpy.random",
|
|
2010
|
+
"notes": "Sampling; cost = numel(output) if replace, n*ceil(log2(n)) if not.",
|
|
2011
|
+
},
|
|
2012
|
+
"random.default_rng": {
|
|
2013
|
+
"category": "free",
|
|
2014
|
+
"module": "numpy.random",
|
|
2015
|
+
"notes": "Construct a new Generator with default BitGenerator.",
|
|
2016
|
+
},
|
|
2017
|
+
"random.dirichlet": {
|
|
2018
|
+
"category": "counted_custom",
|
|
2019
|
+
"module": "numpy.random",
|
|
2020
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2021
|
+
},
|
|
2022
|
+
"random.exponential": {
|
|
2023
|
+
"category": "counted_custom",
|
|
2024
|
+
"module": "numpy.random",
|
|
2025
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2026
|
+
},
|
|
2027
|
+
"random.f": {
|
|
2028
|
+
"category": "counted_custom",
|
|
2029
|
+
"module": "numpy.random",
|
|
2030
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2031
|
+
},
|
|
2032
|
+
"random.gamma": {
|
|
2033
|
+
"category": "counted_custom",
|
|
2034
|
+
"module": "numpy.random",
|
|
2035
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2036
|
+
},
|
|
2037
|
+
"random.geometric": {
|
|
2038
|
+
"category": "counted_custom",
|
|
2039
|
+
"module": "numpy.random",
|
|
2040
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2041
|
+
},
|
|
2042
|
+
"random.get_state": {
|
|
2043
|
+
"category": "free",
|
|
2044
|
+
"module": "numpy.random",
|
|
2045
|
+
"notes": "Return tuple representing internal state of generator.",
|
|
2046
|
+
},
|
|
2047
|
+
"random.gumbel": {
|
|
2048
|
+
"category": "counted_custom",
|
|
2049
|
+
"module": "numpy.random",
|
|
2050
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2051
|
+
},
|
|
2052
|
+
"random.hypergeometric": {
|
|
2053
|
+
"category": "counted_custom",
|
|
2054
|
+
"module": "numpy.random",
|
|
2055
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2056
|
+
},
|
|
2057
|
+
"random.laplace": {
|
|
2058
|
+
"category": "counted_custom",
|
|
2059
|
+
"module": "numpy.random",
|
|
2060
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2061
|
+
},
|
|
2062
|
+
"random.logistic": {
|
|
2063
|
+
"category": "counted_custom",
|
|
2064
|
+
"module": "numpy.random",
|
|
2065
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2066
|
+
},
|
|
2067
|
+
"random.lognormal": {
|
|
2068
|
+
"category": "counted_custom",
|
|
2069
|
+
"module": "numpy.random",
|
|
2070
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2071
|
+
},
|
|
2072
|
+
"random.logseries": {
|
|
2073
|
+
"category": "counted_custom",
|
|
2074
|
+
"module": "numpy.random",
|
|
2075
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2076
|
+
},
|
|
2077
|
+
"random.multinomial": {
|
|
2078
|
+
"category": "counted_custom",
|
|
2079
|
+
"module": "numpy.random",
|
|
2080
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2081
|
+
},
|
|
2082
|
+
"random.multivariate_normal": {
|
|
2083
|
+
"category": "counted_custom",
|
|
2084
|
+
"module": "numpy.random",
|
|
2085
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2086
|
+
},
|
|
2087
|
+
"random.negative_binomial": {
|
|
2088
|
+
"category": "counted_custom",
|
|
2089
|
+
"module": "numpy.random",
|
|
2090
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2091
|
+
},
|
|
2092
|
+
"random.noncentral_chisquare": {
|
|
2093
|
+
"category": "counted_custom",
|
|
2094
|
+
"module": "numpy.random",
|
|
2095
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2096
|
+
},
|
|
2097
|
+
"random.noncentral_f": {
|
|
2098
|
+
"category": "counted_custom",
|
|
2099
|
+
"module": "numpy.random",
|
|
2100
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2101
|
+
},
|
|
2102
|
+
"random.normal": {
|
|
2103
|
+
"category": "counted_custom",
|
|
2104
|
+
"module": "numpy.random",
|
|
2105
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2106
|
+
},
|
|
2107
|
+
"random.pareto": {
|
|
2108
|
+
"category": "counted_custom",
|
|
2109
|
+
"module": "numpy.random",
|
|
2110
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2111
|
+
},
|
|
2112
|
+
"random.permutation": {
|
|
2113
|
+
"category": "counted_custom",
|
|
2114
|
+
"module": "numpy.random",
|
|
2115
|
+
"notes": "Shuffle; cost = n*ceil(log2(n)).",
|
|
2116
|
+
},
|
|
2117
|
+
"random.poisson": {
|
|
2118
|
+
"category": "counted_custom",
|
|
2119
|
+
"module": "numpy.random",
|
|
2120
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2121
|
+
},
|
|
2122
|
+
"random.power": {
|
|
2123
|
+
"category": "counted_custom",
|
|
2124
|
+
"module": "numpy.random",
|
|
2125
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2126
|
+
},
|
|
2127
|
+
"random.rand": {
|
|
2128
|
+
"category": "counted_custom",
|
|
2129
|
+
"module": "numpy.random",
|
|
2130
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2131
|
+
},
|
|
2132
|
+
"random.randint": {
|
|
2133
|
+
"category": "counted_custom",
|
|
2134
|
+
"module": "numpy.random",
|
|
2135
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2136
|
+
},
|
|
2137
|
+
"random.randn": {
|
|
2138
|
+
"category": "counted_custom",
|
|
2139
|
+
"module": "numpy.random",
|
|
2140
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2141
|
+
},
|
|
2142
|
+
"random.random": {
|
|
2143
|
+
"category": "counted_custom",
|
|
2144
|
+
"module": "numpy.random",
|
|
2145
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2146
|
+
},
|
|
2147
|
+
"random.random_integers": {
|
|
2148
|
+
"category": "counted_custom",
|
|
2149
|
+
"module": "numpy.random",
|
|
2150
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2151
|
+
},
|
|
2152
|
+
"random.random_sample": {
|
|
2153
|
+
"category": "counted_custom",
|
|
2154
|
+
"module": "numpy.random",
|
|
2155
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2156
|
+
},
|
|
2157
|
+
"random.ranf": {
|
|
2158
|
+
"category": "counted_custom",
|
|
2159
|
+
"module": "numpy.random",
|
|
2160
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2161
|
+
},
|
|
2162
|
+
"random.rayleigh": {
|
|
2163
|
+
"category": "counted_custom",
|
|
2164
|
+
"module": "numpy.random",
|
|
2165
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2166
|
+
},
|
|
2167
|
+
"random.sample": {
|
|
2168
|
+
"category": "counted_custom",
|
|
2169
|
+
"module": "numpy.random",
|
|
2170
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2171
|
+
},
|
|
2172
|
+
"random.seed": {
|
|
2173
|
+
"category": "free",
|
|
2174
|
+
"module": "numpy.random",
|
|
2175
|
+
"notes": "Seed random number generator.",
|
|
2176
|
+
},
|
|
2177
|
+
"random.set_state": {
|
|
2178
|
+
"category": "free",
|
|
2179
|
+
"module": "numpy.random",
|
|
2180
|
+
"notes": "Set internal state of generator.",
|
|
2181
|
+
},
|
|
2182
|
+
"random.shuffle": {
|
|
2183
|
+
"category": "counted_custom",
|
|
2184
|
+
"module": "numpy.random",
|
|
2185
|
+
"notes": "Shuffle; cost = n*ceil(log2(n)).",
|
|
2186
|
+
},
|
|
2187
|
+
"random.standard_cauchy": {
|
|
2188
|
+
"category": "counted_custom",
|
|
2189
|
+
"module": "numpy.random",
|
|
2190
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2191
|
+
},
|
|
2192
|
+
"random.standard_exponential": {
|
|
2193
|
+
"category": "counted_custom",
|
|
2194
|
+
"module": "numpy.random",
|
|
2195
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2196
|
+
},
|
|
2197
|
+
"random.standard_gamma": {
|
|
2198
|
+
"category": "counted_custom",
|
|
2199
|
+
"module": "numpy.random",
|
|
2200
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2201
|
+
},
|
|
2202
|
+
"random.standard_normal": {
|
|
2203
|
+
"category": "counted_custom",
|
|
2204
|
+
"module": "numpy.random",
|
|
2205
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2206
|
+
},
|
|
2207
|
+
"random.standard_t": {
|
|
2208
|
+
"category": "counted_custom",
|
|
2209
|
+
"module": "numpy.random",
|
|
2210
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2211
|
+
},
|
|
2212
|
+
"random.triangular": {
|
|
2213
|
+
"category": "counted_custom",
|
|
2214
|
+
"module": "numpy.random",
|
|
2215
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2216
|
+
},
|
|
2217
|
+
"random.uniform": {
|
|
2218
|
+
"category": "counted_custom",
|
|
2219
|
+
"module": "numpy.random",
|
|
2220
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2221
|
+
},
|
|
2222
|
+
"random.vonmises": {
|
|
2223
|
+
"category": "counted_custom",
|
|
2224
|
+
"module": "numpy.random",
|
|
2225
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2226
|
+
},
|
|
2227
|
+
"random.wald": {
|
|
2228
|
+
"category": "counted_custom",
|
|
2229
|
+
"module": "numpy.random",
|
|
2230
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2231
|
+
},
|
|
2232
|
+
"random.weibull": {
|
|
2233
|
+
"category": "counted_custom",
|
|
2234
|
+
"module": "numpy.random",
|
|
2235
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2236
|
+
},
|
|
2237
|
+
"random.zipf": {
|
|
2238
|
+
"category": "counted_custom",
|
|
2239
|
+
"module": "numpy.random",
|
|
2240
|
+
"notes": "Sampling; cost = numel(output).",
|
|
2241
|
+
},
|
|
2242
|
+
# ------------------------------------------------------------------
|
|
2243
|
+
# random.Generator.* — counted method-level entries (issue #18)
|
|
2244
|
+
# category=counted_random_method or free_random_method
|
|
2245
|
+
# ------------------------------------------------------------------
|
|
2246
|
+
"random.Generator.beta": {
|
|
2247
|
+
"category": "counted_random_method",
|
|
2248
|
+
"module": "numpy.random",
|
|
2249
|
+
"cost_formula": "numel(output)",
|
|
2250
|
+
"notes": "Beta distribution; cost = numel(output).",
|
|
2251
|
+
},
|
|
2252
|
+
"random.Generator.binomial": {
|
|
2253
|
+
"category": "counted_random_method",
|
|
2254
|
+
"module": "numpy.random",
|
|
2255
|
+
"cost_formula": "numel(output)",
|
|
2256
|
+
"notes": "Binomial distribution; cost = numel(output).",
|
|
2257
|
+
},
|
|
2258
|
+
"random.Generator.bytes": {
|
|
2259
|
+
"category": "counted_random_method",
|
|
2260
|
+
"module": "numpy.random",
|
|
2261
|
+
"cost_formula": "length",
|
|
2262
|
+
"notes": "Raw bytes; cost = length argument.",
|
|
2263
|
+
},
|
|
2264
|
+
"random.Generator.chisquare": {
|
|
2265
|
+
"category": "counted_random_method",
|
|
2266
|
+
"module": "numpy.random",
|
|
2267
|
+
"cost_formula": "numel(output)",
|
|
2268
|
+
"notes": "Chi-square distribution; cost = numel(output).",
|
|
2269
|
+
},
|
|
2270
|
+
"random.Generator.choice": {
|
|
2271
|
+
"category": "counted_random_method",
|
|
2272
|
+
"module": "numpy.random",
|
|
2273
|
+
"cost_formula": "choice_cost",
|
|
2274
|
+
"notes": "numel(output) if replace else sort_cost(n).",
|
|
2275
|
+
},
|
|
2276
|
+
"random.Generator.dirichlet": {
|
|
2277
|
+
"category": "counted_random_method",
|
|
2278
|
+
"module": "numpy.random",
|
|
2279
|
+
"cost_formula": "numel(output)",
|
|
2280
|
+
"notes": "Dirichlet distribution; cost = numel(output).",
|
|
2281
|
+
},
|
|
2282
|
+
"random.Generator.exponential": {
|
|
2283
|
+
"category": "counted_random_method",
|
|
2284
|
+
"module": "numpy.random",
|
|
2285
|
+
"cost_formula": "numel(output)",
|
|
2286
|
+
"notes": "Exponential distribution; cost = numel(output).",
|
|
2287
|
+
},
|
|
2288
|
+
"random.Generator.f": {
|
|
2289
|
+
"category": "counted_random_method",
|
|
2290
|
+
"module": "numpy.random",
|
|
2291
|
+
"cost_formula": "numel(output)",
|
|
2292
|
+
"notes": "F distribution; cost = numel(output).",
|
|
2293
|
+
},
|
|
2294
|
+
"random.Generator.gamma": {
|
|
2295
|
+
"category": "counted_random_method",
|
|
2296
|
+
"module": "numpy.random",
|
|
2297
|
+
"cost_formula": "numel(output)",
|
|
2298
|
+
"notes": "Gamma distribution; cost = numel(output).",
|
|
2299
|
+
},
|
|
2300
|
+
"random.Generator.geometric": {
|
|
2301
|
+
"category": "counted_random_method",
|
|
2302
|
+
"module": "numpy.random",
|
|
2303
|
+
"cost_formula": "numel(output)",
|
|
2304
|
+
"notes": "Geometric distribution; cost = numel(output).",
|
|
2305
|
+
},
|
|
2306
|
+
"random.Generator.gumbel": {
|
|
2307
|
+
"category": "counted_random_method",
|
|
2308
|
+
"module": "numpy.random",
|
|
2309
|
+
"cost_formula": "numel(output)",
|
|
2310
|
+
"notes": "Gumbel distribution; cost = numel(output).",
|
|
2311
|
+
},
|
|
2312
|
+
"random.Generator.hypergeometric": {
|
|
2313
|
+
"category": "counted_random_method",
|
|
2314
|
+
"module": "numpy.random",
|
|
2315
|
+
"cost_formula": "numel(output)",
|
|
2316
|
+
"notes": "Hypergeometric distribution; cost = numel(output).",
|
|
2317
|
+
},
|
|
2318
|
+
"random.Generator.integers": {
|
|
2319
|
+
"category": "counted_random_method",
|
|
2320
|
+
"module": "numpy.random",
|
|
2321
|
+
"cost_formula": "numel(output)",
|
|
2322
|
+
"notes": "Modern Generator integers (replaces legacy randint).",
|
|
2323
|
+
},
|
|
2324
|
+
"random.Generator.laplace": {
|
|
2325
|
+
"category": "counted_random_method",
|
|
2326
|
+
"module": "numpy.random",
|
|
2327
|
+
"cost_formula": "numel(output)",
|
|
2328
|
+
"notes": "Laplace distribution; cost = numel(output).",
|
|
2329
|
+
},
|
|
2330
|
+
"random.Generator.logistic": {
|
|
2331
|
+
"category": "counted_random_method",
|
|
2332
|
+
"module": "numpy.random",
|
|
2333
|
+
"cost_formula": "numel(output)",
|
|
2334
|
+
"notes": "Logistic distribution; cost = numel(output).",
|
|
2335
|
+
},
|
|
2336
|
+
"random.Generator.lognormal": {
|
|
2337
|
+
"category": "counted_random_method",
|
|
2338
|
+
"module": "numpy.random",
|
|
2339
|
+
"cost_formula": "numel(output)",
|
|
2340
|
+
"notes": "Log-normal distribution; cost = numel(output).",
|
|
2341
|
+
},
|
|
2342
|
+
"random.Generator.logseries": {
|
|
2343
|
+
"category": "counted_random_method",
|
|
2344
|
+
"module": "numpy.random",
|
|
2345
|
+
"cost_formula": "numel(output)",
|
|
2346
|
+
"notes": "Log-series distribution; cost = numel(output).",
|
|
2347
|
+
},
|
|
2348
|
+
"random.Generator.multinomial": {
|
|
2349
|
+
"category": "counted_random_method",
|
|
2350
|
+
"module": "numpy.random",
|
|
2351
|
+
"cost_formula": "numel(output)",
|
|
2352
|
+
"notes": "Multinomial distribution; cost = numel(output).",
|
|
2353
|
+
},
|
|
2354
|
+
"random.Generator.multivariate_hypergeometric": {
|
|
2355
|
+
"category": "counted_random_method",
|
|
2356
|
+
"module": "numpy.random",
|
|
2357
|
+
"cost_formula": "numel(output)",
|
|
2358
|
+
"notes": "Multivariate hypergeometric; cost = numel(output).",
|
|
2359
|
+
},
|
|
2360
|
+
"random.Generator.multivariate_normal": {
|
|
2361
|
+
"category": "counted_random_method",
|
|
2362
|
+
"module": "numpy.random",
|
|
2363
|
+
"cost_formula": "numel(output)",
|
|
2364
|
+
"notes": "Multivariate normal; cost = numel(output).",
|
|
2365
|
+
},
|
|
2366
|
+
"random.Generator.negative_binomial": {
|
|
2367
|
+
"category": "counted_random_method",
|
|
2368
|
+
"module": "numpy.random",
|
|
2369
|
+
"cost_formula": "numel(output)",
|
|
2370
|
+
"notes": "Negative binomial distribution; cost = numel(output).",
|
|
2371
|
+
},
|
|
2372
|
+
"random.Generator.noncentral_chisquare": {
|
|
2373
|
+
"category": "counted_random_method",
|
|
2374
|
+
"module": "numpy.random",
|
|
2375
|
+
"cost_formula": "numel(output)",
|
|
2376
|
+
"notes": "Noncentral chi-square; cost = numel(output).",
|
|
2377
|
+
},
|
|
2378
|
+
"random.Generator.noncentral_f": {
|
|
2379
|
+
"category": "counted_random_method",
|
|
2380
|
+
"module": "numpy.random",
|
|
2381
|
+
"cost_formula": "numel(output)",
|
|
2382
|
+
"notes": "Noncentral F; cost = numel(output).",
|
|
2383
|
+
},
|
|
2384
|
+
"random.Generator.normal": {
|
|
2385
|
+
"category": "counted_random_method",
|
|
2386
|
+
"module": "numpy.random",
|
|
2387
|
+
"cost_formula": "numel(output)",
|
|
2388
|
+
"notes": "Normal distribution; cost = numel(output).",
|
|
2389
|
+
},
|
|
2390
|
+
"random.Generator.pareto": {
|
|
2391
|
+
"category": "counted_random_method",
|
|
2392
|
+
"module": "numpy.random",
|
|
2393
|
+
"cost_formula": "numel(output)",
|
|
2394
|
+
"notes": "Pareto distribution; cost = numel(output).",
|
|
2395
|
+
},
|
|
2396
|
+
"random.Generator.permutation": {
|
|
2397
|
+
"category": "counted_random_method",
|
|
2398
|
+
"module": "numpy.random",
|
|
2399
|
+
"cost_formula": "shape[axis]",
|
|
2400
|
+
"notes": "Random permutation; cost = shape[axis] (Fisher-Yates draws).",
|
|
2401
|
+
},
|
|
2402
|
+
"random.Generator.permuted": {
|
|
2403
|
+
"category": "counted_random_method",
|
|
2404
|
+
"module": "numpy.random",
|
|
2405
|
+
"cost_formula": "numel(input)",
|
|
2406
|
+
"notes": "Permute along axis; cost from input array size.",
|
|
2407
|
+
},
|
|
2408
|
+
"random.Generator.poisson": {
|
|
2409
|
+
"category": "counted_random_method",
|
|
2410
|
+
"module": "numpy.random",
|
|
2411
|
+
"cost_formula": "numel(output)",
|
|
2412
|
+
"notes": "Poisson distribution; cost = numel(output).",
|
|
2413
|
+
},
|
|
2414
|
+
"random.Generator.power": {
|
|
2415
|
+
"category": "counted_random_method",
|
|
2416
|
+
"module": "numpy.random",
|
|
2417
|
+
"cost_formula": "numel(output)",
|
|
2418
|
+
"notes": "Power distribution; cost = numel(output).",
|
|
2419
|
+
},
|
|
2420
|
+
"random.Generator.random": {
|
|
2421
|
+
"category": "counted_random_method",
|
|
2422
|
+
"module": "numpy.random",
|
|
2423
|
+
"cost_formula": "numel(output)",
|
|
2424
|
+
"notes": "Uniform [0, 1) — modern Generator equivalent of rand/random_sample.",
|
|
2425
|
+
},
|
|
2426
|
+
"random.Generator.rayleigh": {
|
|
2427
|
+
"category": "counted_random_method",
|
|
2428
|
+
"module": "numpy.random",
|
|
2429
|
+
"cost_formula": "numel(output)",
|
|
2430
|
+
"notes": "Rayleigh distribution; cost = numel(output).",
|
|
2431
|
+
},
|
|
2432
|
+
"random.Generator.shuffle": {
|
|
2433
|
+
"category": "counted_random_method",
|
|
2434
|
+
"module": "numpy.random",
|
|
2435
|
+
"cost_formula": "shape[axis]",
|
|
2436
|
+
"notes": "In-place shuffle; cost = shape[axis] (Fisher-Yates draws).",
|
|
2437
|
+
},
|
|
2438
|
+
"random.Generator.standard_cauchy": {
|
|
2439
|
+
"category": "counted_random_method",
|
|
2440
|
+
"module": "numpy.random",
|
|
2441
|
+
"cost_formula": "numel(output)",
|
|
2442
|
+
"notes": "Standard Cauchy distribution; cost = numel(output).",
|
|
2443
|
+
},
|
|
2444
|
+
"random.Generator.standard_exponential": {
|
|
2445
|
+
"category": "counted_random_method",
|
|
2446
|
+
"module": "numpy.random",
|
|
2447
|
+
"cost_formula": "numel(output)",
|
|
2448
|
+
"notes": "Standard exponential; cost = numel(output).",
|
|
2449
|
+
},
|
|
2450
|
+
"random.Generator.standard_gamma": {
|
|
2451
|
+
"category": "counted_random_method",
|
|
2452
|
+
"module": "numpy.random",
|
|
2453
|
+
"cost_formula": "numel(output)",
|
|
2454
|
+
"notes": "Standard gamma; cost = numel(output).",
|
|
2455
|
+
},
|
|
2456
|
+
"random.Generator.standard_normal": {
|
|
2457
|
+
"category": "counted_random_method",
|
|
2458
|
+
"module": "numpy.random",
|
|
2459
|
+
"cost_formula": "numel(output)",
|
|
2460
|
+
"notes": "Standard normal; cost = numel(output).",
|
|
2461
|
+
},
|
|
2462
|
+
"random.Generator.standard_t": {
|
|
2463
|
+
"category": "counted_random_method",
|
|
2464
|
+
"module": "numpy.random",
|
|
2465
|
+
"cost_formula": "numel(output)",
|
|
2466
|
+
"notes": "Standard Student-t; cost = numel(output).",
|
|
2467
|
+
},
|
|
2468
|
+
"random.Generator.triangular": {
|
|
2469
|
+
"category": "counted_random_method",
|
|
2470
|
+
"module": "numpy.random",
|
|
2471
|
+
"cost_formula": "numel(output)",
|
|
2472
|
+
"notes": "Triangular distribution; cost = numel(output).",
|
|
2473
|
+
},
|
|
2474
|
+
"random.Generator.uniform": {
|
|
2475
|
+
"category": "counted_random_method",
|
|
2476
|
+
"module": "numpy.random",
|
|
2477
|
+
"cost_formula": "numel(output)",
|
|
2478
|
+
"notes": "Uniform distribution; cost = numel(output).",
|
|
2479
|
+
},
|
|
2480
|
+
"random.Generator.vonmises": {
|
|
2481
|
+
"category": "counted_random_method",
|
|
2482
|
+
"module": "numpy.random",
|
|
2483
|
+
"cost_formula": "numel(output)",
|
|
2484
|
+
"notes": "Von Mises distribution; cost = numel(output).",
|
|
2485
|
+
},
|
|
2486
|
+
"random.Generator.wald": {
|
|
2487
|
+
"category": "counted_random_method",
|
|
2488
|
+
"module": "numpy.random",
|
|
2489
|
+
"cost_formula": "numel(output)",
|
|
2490
|
+
"notes": "Wald (inverse Gaussian) distribution; cost = numel(output).",
|
|
2491
|
+
},
|
|
2492
|
+
"random.Generator.weibull": {
|
|
2493
|
+
"category": "counted_random_method",
|
|
2494
|
+
"module": "numpy.random",
|
|
2495
|
+
"cost_formula": "numel(output)",
|
|
2496
|
+
"notes": "Weibull distribution; cost = numel(output).",
|
|
2497
|
+
},
|
|
2498
|
+
"random.Generator.zipf": {
|
|
2499
|
+
"category": "counted_random_method",
|
|
2500
|
+
"module": "numpy.random",
|
|
2501
|
+
"cost_formula": "numel(output)",
|
|
2502
|
+
"notes": "Zipf distribution; cost = numel(output).",
|
|
2503
|
+
},
|
|
2504
|
+
# Free (passthrough; counting happens at the sampler-method level)
|
|
2505
|
+
"random.Generator.bit_generator": {
|
|
2506
|
+
"category": "free_random_method",
|
|
2507
|
+
"module": "numpy.random",
|
|
2508
|
+
"notes": "Underlying BitGenerator; attribute access, no math.",
|
|
2509
|
+
},
|
|
2510
|
+
"random.Generator.spawn": {
|
|
2511
|
+
"category": "free_random_method",
|
|
2512
|
+
"module": "numpy.random",
|
|
2513
|
+
"notes": "Returns child Generators; subclass override wraps them as _CountedGenerator.",
|
|
2514
|
+
},
|
|
2515
|
+
# ------------------------------------------------------------------
|
|
2516
|
+
# random.RandomState.* — counted method-level entries (issue #18)
|
|
2517
|
+
# ------------------------------------------------------------------
|
|
2518
|
+
"random.RandomState.beta": {
|
|
2519
|
+
"category": "counted_random_method",
|
|
2520
|
+
"module": "numpy.random",
|
|
2521
|
+
"cost_formula": "numel(output)",
|
|
2522
|
+
"notes": "Legacy beta sampler; cost = numel(output).",
|
|
2523
|
+
},
|
|
2524
|
+
"random.RandomState.binomial": {
|
|
2525
|
+
"category": "counted_random_method",
|
|
2526
|
+
"module": "numpy.random",
|
|
2527
|
+
"cost_formula": "numel(output)",
|
|
2528
|
+
"notes": "Legacy binomial sampler; cost = numel(output).",
|
|
2529
|
+
},
|
|
2530
|
+
"random.RandomState.bytes": {
|
|
2531
|
+
"category": "counted_random_method",
|
|
2532
|
+
"module": "numpy.random",
|
|
2533
|
+
"cost_formula": "length",
|
|
2534
|
+
"notes": "Legacy bytes sampler; cost = length argument.",
|
|
2535
|
+
},
|
|
2536
|
+
"random.RandomState.chisquare": {
|
|
2537
|
+
"category": "counted_random_method",
|
|
2538
|
+
"module": "numpy.random",
|
|
2539
|
+
"cost_formula": "numel(output)",
|
|
2540
|
+
"notes": "Legacy chi-square sampler; cost = numel(output).",
|
|
2541
|
+
},
|
|
2542
|
+
"random.RandomState.choice": {
|
|
2543
|
+
"category": "counted_random_method",
|
|
2544
|
+
"module": "numpy.random",
|
|
2545
|
+
"cost_formula": "choice_cost",
|
|
2546
|
+
"notes": "Legacy choice sampler; numel(output) if replace else sort_cost(n).",
|
|
2547
|
+
},
|
|
2548
|
+
"random.RandomState.dirichlet": {
|
|
2549
|
+
"category": "counted_random_method",
|
|
2550
|
+
"module": "numpy.random",
|
|
2551
|
+
"cost_formula": "numel(output)",
|
|
2552
|
+
"notes": "Legacy Dirichlet sampler; cost = numel(output).",
|
|
2553
|
+
},
|
|
2554
|
+
"random.RandomState.exponential": {
|
|
2555
|
+
"category": "counted_random_method",
|
|
2556
|
+
"module": "numpy.random",
|
|
2557
|
+
"cost_formula": "numel(output)",
|
|
2558
|
+
"notes": "Legacy exponential sampler; cost = numel(output).",
|
|
2559
|
+
},
|
|
2560
|
+
"random.RandomState.f": {
|
|
2561
|
+
"category": "counted_random_method",
|
|
2562
|
+
"module": "numpy.random",
|
|
2563
|
+
"cost_formula": "numel(output)",
|
|
2564
|
+
"notes": "Legacy F sampler; cost = numel(output).",
|
|
2565
|
+
},
|
|
2566
|
+
"random.RandomState.gamma": {
|
|
2567
|
+
"category": "counted_random_method",
|
|
2568
|
+
"module": "numpy.random",
|
|
2569
|
+
"cost_formula": "numel(output)",
|
|
2570
|
+
"notes": "Legacy gamma sampler; cost = numel(output).",
|
|
2571
|
+
},
|
|
2572
|
+
"random.RandomState.geometric": {
|
|
2573
|
+
"category": "counted_random_method",
|
|
2574
|
+
"module": "numpy.random",
|
|
2575
|
+
"cost_formula": "numel(output)",
|
|
2576
|
+
"notes": "Legacy geometric sampler; cost = numel(output).",
|
|
2577
|
+
},
|
|
2578
|
+
"random.RandomState.gumbel": {
|
|
2579
|
+
"category": "counted_random_method",
|
|
2580
|
+
"module": "numpy.random",
|
|
2581
|
+
"cost_formula": "numel(output)",
|
|
2582
|
+
"notes": "Legacy Gumbel sampler; cost = numel(output).",
|
|
2583
|
+
},
|
|
2584
|
+
"random.RandomState.hypergeometric": {
|
|
2585
|
+
"category": "counted_random_method",
|
|
2586
|
+
"module": "numpy.random",
|
|
2587
|
+
"cost_formula": "numel(output)",
|
|
2588
|
+
"notes": "Legacy hypergeometric sampler; cost = numel(output).",
|
|
2589
|
+
},
|
|
2590
|
+
"random.RandomState.laplace": {
|
|
2591
|
+
"category": "counted_random_method",
|
|
2592
|
+
"module": "numpy.random",
|
|
2593
|
+
"cost_formula": "numel(output)",
|
|
2594
|
+
"notes": "Legacy Laplace sampler; cost = numel(output).",
|
|
2595
|
+
},
|
|
2596
|
+
"random.RandomState.logistic": {
|
|
2597
|
+
"category": "counted_random_method",
|
|
2598
|
+
"module": "numpy.random",
|
|
2599
|
+
"cost_formula": "numel(output)",
|
|
2600
|
+
"notes": "Legacy logistic sampler; cost = numel(output).",
|
|
2601
|
+
},
|
|
2602
|
+
"random.RandomState.lognormal": {
|
|
2603
|
+
"category": "counted_random_method",
|
|
2604
|
+
"module": "numpy.random",
|
|
2605
|
+
"cost_formula": "numel(output)",
|
|
2606
|
+
"notes": "Legacy log-normal sampler; cost = numel(output).",
|
|
2607
|
+
},
|
|
2608
|
+
"random.RandomState.logseries": {
|
|
2609
|
+
"category": "counted_random_method",
|
|
2610
|
+
"module": "numpy.random",
|
|
2611
|
+
"cost_formula": "numel(output)",
|
|
2612
|
+
"notes": "Legacy log-series sampler; cost = numel(output).",
|
|
2613
|
+
},
|
|
2614
|
+
"random.RandomState.multinomial": {
|
|
2615
|
+
"category": "counted_random_method",
|
|
2616
|
+
"module": "numpy.random",
|
|
2617
|
+
"cost_formula": "numel(output)",
|
|
2618
|
+
"notes": "Legacy multinomial sampler; cost = numel(output).",
|
|
2619
|
+
},
|
|
2620
|
+
"random.RandomState.multivariate_normal": {
|
|
2621
|
+
"category": "counted_random_method",
|
|
2622
|
+
"module": "numpy.random",
|
|
2623
|
+
"cost_formula": "numel(output)",
|
|
2624
|
+
"notes": "Legacy multivariate normal; cost = numel(output).",
|
|
2625
|
+
},
|
|
2626
|
+
"random.RandomState.negative_binomial": {
|
|
2627
|
+
"category": "counted_random_method",
|
|
2628
|
+
"module": "numpy.random",
|
|
2629
|
+
"cost_formula": "numel(output)",
|
|
2630
|
+
"notes": "Legacy negative binomial sampler; cost = numel(output).",
|
|
2631
|
+
},
|
|
2632
|
+
"random.RandomState.noncentral_chisquare": {
|
|
2633
|
+
"category": "counted_random_method",
|
|
2634
|
+
"module": "numpy.random",
|
|
2635
|
+
"cost_formula": "numel(output)",
|
|
2636
|
+
"notes": "Legacy noncentral chi-square; cost = numel(output).",
|
|
2637
|
+
},
|
|
2638
|
+
"random.RandomState.noncentral_f": {
|
|
2639
|
+
"category": "counted_random_method",
|
|
2640
|
+
"module": "numpy.random",
|
|
2641
|
+
"cost_formula": "numel(output)",
|
|
2642
|
+
"notes": "Legacy noncentral F; cost = numel(output).",
|
|
2643
|
+
},
|
|
2644
|
+
"random.RandomState.normal": {
|
|
2645
|
+
"category": "counted_random_method",
|
|
2646
|
+
"module": "numpy.random",
|
|
2647
|
+
"cost_formula": "numel(output)",
|
|
2648
|
+
"notes": "Legacy normal sampler; cost = numel(output).",
|
|
2649
|
+
},
|
|
2650
|
+
"random.RandomState.pareto": {
|
|
2651
|
+
"category": "counted_random_method",
|
|
2652
|
+
"module": "numpy.random",
|
|
2653
|
+
"cost_formula": "numel(output)",
|
|
2654
|
+
"notes": "Legacy Pareto sampler; cost = numel(output).",
|
|
2655
|
+
},
|
|
2656
|
+
"random.RandomState.permutation": {
|
|
2657
|
+
"category": "counted_random_method",
|
|
2658
|
+
"module": "numpy.random",
|
|
2659
|
+
"cost_formula": "shape[axis]",
|
|
2660
|
+
"notes": "Legacy permutation; cost = shape[axis] (Fisher-Yates draws). RandomState has no axis kwarg; defaults to 0.",
|
|
2661
|
+
},
|
|
2662
|
+
"random.RandomState.poisson": {
|
|
2663
|
+
"category": "counted_random_method",
|
|
2664
|
+
"module": "numpy.random",
|
|
2665
|
+
"cost_formula": "numel(output)",
|
|
2666
|
+
"notes": "Legacy Poisson sampler; cost = numel(output).",
|
|
2667
|
+
},
|
|
2668
|
+
"random.RandomState.power": {
|
|
2669
|
+
"category": "counted_random_method",
|
|
2670
|
+
"module": "numpy.random",
|
|
2671
|
+
"cost_formula": "numel(output)",
|
|
2672
|
+
"notes": "Legacy power sampler; cost = numel(output).",
|
|
2673
|
+
},
|
|
2674
|
+
"random.RandomState.rand": {
|
|
2675
|
+
"category": "counted_random_method",
|
|
2676
|
+
"module": "numpy.random",
|
|
2677
|
+
"cost_formula": "numel(output)",
|
|
2678
|
+
"notes": "Legacy uniform [0,1); cost = numel(output).",
|
|
2679
|
+
},
|
|
2680
|
+
"random.RandomState.randint": {
|
|
2681
|
+
"category": "counted_random_method",
|
|
2682
|
+
"module": "numpy.random",
|
|
2683
|
+
"cost_formula": "numel(output)",
|
|
2684
|
+
"notes": "Legacy integer sampler; cost = numel(output).",
|
|
2685
|
+
},
|
|
2686
|
+
"random.RandomState.randn": {
|
|
2687
|
+
"category": "counted_random_method",
|
|
2688
|
+
"module": "numpy.random",
|
|
2689
|
+
"cost_formula": "numel(output)",
|
|
2690
|
+
"notes": "Legacy standard normal alias; cost = numel(output).",
|
|
2691
|
+
},
|
|
2692
|
+
"random.RandomState.random": {
|
|
2693
|
+
"category": "counted_random_method",
|
|
2694
|
+
"module": "numpy.random",
|
|
2695
|
+
"cost_formula": "numel(output)",
|
|
2696
|
+
"notes": "Legacy uniform [0,1) alias for random_sample.",
|
|
2697
|
+
},
|
|
2698
|
+
"random.RandomState.random_integers": {
|
|
2699
|
+
"category": "counted_random_method",
|
|
2700
|
+
"module": "numpy.random",
|
|
2701
|
+
"cost_formula": "numel(output)",
|
|
2702
|
+
"notes": "Legacy deprecated integer sampler; cost = numel(output).",
|
|
2703
|
+
},
|
|
2704
|
+
"random.RandomState.random_sample": {
|
|
2705
|
+
"category": "counted_random_method",
|
|
2706
|
+
"module": "numpy.random",
|
|
2707
|
+
"cost_formula": "numel(output)",
|
|
2708
|
+
"notes": "Legacy uniform [0,1); cost = numel(output).",
|
|
2709
|
+
},
|
|
2710
|
+
"random.RandomState.rayleigh": {
|
|
2711
|
+
"category": "counted_random_method",
|
|
2712
|
+
"module": "numpy.random",
|
|
2713
|
+
"cost_formula": "numel(output)",
|
|
2714
|
+
"notes": "Legacy Rayleigh sampler; cost = numel(output).",
|
|
2715
|
+
},
|
|
2716
|
+
"random.RandomState.shuffle": {
|
|
2717
|
+
"category": "counted_random_method",
|
|
2718
|
+
"module": "numpy.random",
|
|
2719
|
+
"cost_formula": "shape[axis]",
|
|
2720
|
+
"notes": "Legacy in-place shuffle; cost = shape[axis] (Fisher-Yates draws). RandomState has no axis kwarg; defaults to 0.",
|
|
2721
|
+
},
|
|
2722
|
+
"random.RandomState.standard_cauchy": {
|
|
2723
|
+
"category": "counted_random_method",
|
|
2724
|
+
"module": "numpy.random",
|
|
2725
|
+
"cost_formula": "numel(output)",
|
|
2726
|
+
"notes": "Legacy standard Cauchy; cost = numel(output).",
|
|
2727
|
+
},
|
|
2728
|
+
"random.RandomState.standard_exponential": {
|
|
2729
|
+
"category": "counted_random_method",
|
|
2730
|
+
"module": "numpy.random",
|
|
2731
|
+
"cost_formula": "numel(output)",
|
|
2732
|
+
"notes": "Legacy standard exponential; cost = numel(output).",
|
|
2733
|
+
},
|
|
2734
|
+
"random.RandomState.standard_gamma": {
|
|
2735
|
+
"category": "counted_random_method",
|
|
2736
|
+
"module": "numpy.random",
|
|
2737
|
+
"cost_formula": "numel(output)",
|
|
2738
|
+
"notes": "Legacy standard gamma; cost = numel(output).",
|
|
2739
|
+
},
|
|
2740
|
+
"random.RandomState.standard_normal": {
|
|
2741
|
+
"category": "counted_random_method",
|
|
2742
|
+
"module": "numpy.random",
|
|
2743
|
+
"cost_formula": "numel(output)",
|
|
2744
|
+
"notes": "Legacy standard normal; cost = numel(output).",
|
|
2745
|
+
},
|
|
2746
|
+
"random.RandomState.standard_t": {
|
|
2747
|
+
"category": "counted_random_method",
|
|
2748
|
+
"module": "numpy.random",
|
|
2749
|
+
"cost_formula": "numel(output)",
|
|
2750
|
+
"notes": "Legacy standard Student-t; cost = numel(output).",
|
|
2751
|
+
},
|
|
2752
|
+
"random.RandomState.tomaxint": {
|
|
2753
|
+
"category": "counted_random_method",
|
|
2754
|
+
"module": "numpy.random",
|
|
2755
|
+
"cost_formula": "numel(output)",
|
|
2756
|
+
"notes": "Legacy max-int sampler; cost = numel(output).",
|
|
2757
|
+
},
|
|
2758
|
+
"random.RandomState.triangular": {
|
|
2759
|
+
"category": "counted_random_method",
|
|
2760
|
+
"module": "numpy.random",
|
|
2761
|
+
"cost_formula": "numel(output)",
|
|
2762
|
+
"notes": "Legacy triangular distribution; cost = numel(output).",
|
|
2763
|
+
},
|
|
2764
|
+
"random.RandomState.uniform": {
|
|
2765
|
+
"category": "counted_random_method",
|
|
2766
|
+
"module": "numpy.random",
|
|
2767
|
+
"cost_formula": "numel(output)",
|
|
2768
|
+
"notes": "Legacy uniform sampler; cost = numel(output).",
|
|
2769
|
+
},
|
|
2770
|
+
"random.RandomState.vonmises": {
|
|
2771
|
+
"category": "counted_random_method",
|
|
2772
|
+
"module": "numpy.random",
|
|
2773
|
+
"cost_formula": "numel(output)",
|
|
2774
|
+
"notes": "Legacy Von Mises sampler; cost = numel(output).",
|
|
2775
|
+
},
|
|
2776
|
+
"random.RandomState.wald": {
|
|
2777
|
+
"category": "counted_random_method",
|
|
2778
|
+
"module": "numpy.random",
|
|
2779
|
+
"cost_formula": "numel(output)",
|
|
2780
|
+
"notes": "Legacy Wald sampler; cost = numel(output).",
|
|
2781
|
+
},
|
|
2782
|
+
"random.RandomState.weibull": {
|
|
2783
|
+
"category": "counted_random_method",
|
|
2784
|
+
"module": "numpy.random",
|
|
2785
|
+
"cost_formula": "numel(output)",
|
|
2786
|
+
"notes": "Legacy Weibull sampler; cost = numel(output).",
|
|
2787
|
+
},
|
|
2788
|
+
"random.RandomState.zipf": {
|
|
2789
|
+
"category": "counted_random_method",
|
|
2790
|
+
"module": "numpy.random",
|
|
2791
|
+
"cost_formula": "numel(output)",
|
|
2792
|
+
"notes": "Legacy Zipf sampler; cost = numel(output).",
|
|
2793
|
+
},
|
|
2794
|
+
# Free RandomState methods
|
|
2795
|
+
"random.RandomState.get_state": {
|
|
2796
|
+
"category": "free_random_method",
|
|
2797
|
+
"module": "numpy.random",
|
|
2798
|
+
"notes": "State accessor; no math.",
|
|
2799
|
+
},
|
|
2800
|
+
"random.RandomState.seed": {
|
|
2801
|
+
"category": "free_random_method",
|
|
2802
|
+
"module": "numpy.random",
|
|
2803
|
+
"notes": "Seed setter; no math.",
|
|
2804
|
+
},
|
|
2805
|
+
"random.RandomState.set_state": {
|
|
2806
|
+
"category": "free_random_method",
|
|
2807
|
+
"module": "numpy.random",
|
|
2808
|
+
"notes": "State setter; no math.",
|
|
2809
|
+
},
|
|
2810
|
+
# ------------------------------------------------------------------
|
|
2811
|
+
# stats distributions (pdf/cdf/ppf)
|
|
2812
|
+
# ------------------------------------------------------------------
|
|
2813
|
+
"stats.norm.pdf": {
|
|
2814
|
+
"category": "counted_custom",
|
|
2815
|
+
"module": "flopscope.stats",
|
|
2816
|
+
"notes": "Normal PDF; cost = numel(input).",
|
|
2817
|
+
},
|
|
2818
|
+
"stats.norm.cdf": {
|
|
2819
|
+
"category": "counted_custom",
|
|
2820
|
+
"module": "flopscope.stats",
|
|
2821
|
+
"notes": "Normal CDF; cost = numel(input).",
|
|
2822
|
+
},
|
|
2823
|
+
"stats.norm.ppf": {
|
|
2824
|
+
"category": "counted_custom",
|
|
2825
|
+
"module": "flopscope.stats",
|
|
2826
|
+
"notes": "Normal PPF (inverse CDF); cost = numel(input).",
|
|
2827
|
+
},
|
|
2828
|
+
"stats.uniform.pdf": {
|
|
2829
|
+
"category": "counted_custom",
|
|
2830
|
+
"module": "flopscope.stats",
|
|
2831
|
+
"notes": "Uniform PDF; cost = numel(input).",
|
|
2832
|
+
},
|
|
2833
|
+
"stats.uniform.cdf": {
|
|
2834
|
+
"category": "counted_custom",
|
|
2835
|
+
"module": "flopscope.stats",
|
|
2836
|
+
"notes": "Uniform CDF; cost = numel(input).",
|
|
2837
|
+
},
|
|
2838
|
+
"stats.uniform.ppf": {
|
|
2839
|
+
"category": "counted_custom",
|
|
2840
|
+
"module": "flopscope.stats",
|
|
2841
|
+
"notes": "Uniform PPF; cost = numel(input).",
|
|
2842
|
+
},
|
|
2843
|
+
"stats.expon.pdf": {
|
|
2844
|
+
"category": "counted_custom",
|
|
2845
|
+
"module": "flopscope.stats",
|
|
2846
|
+
"notes": "Exponential PDF; cost = numel(input).",
|
|
2847
|
+
},
|
|
2848
|
+
"stats.expon.cdf": {
|
|
2849
|
+
"category": "counted_custom",
|
|
2850
|
+
"module": "flopscope.stats",
|
|
2851
|
+
"notes": "Exponential CDF; cost = numel(input).",
|
|
2852
|
+
},
|
|
2853
|
+
"stats.expon.ppf": {
|
|
2854
|
+
"category": "counted_custom",
|
|
2855
|
+
"module": "flopscope.stats",
|
|
2856
|
+
"notes": "Exponential PPF; cost = numel(input).",
|
|
2857
|
+
},
|
|
2858
|
+
"stats.cauchy.pdf": {
|
|
2859
|
+
"category": "counted_custom",
|
|
2860
|
+
"module": "flopscope.stats",
|
|
2861
|
+
"notes": "Cauchy PDF; cost = numel(input).",
|
|
2862
|
+
},
|
|
2863
|
+
"stats.cauchy.cdf": {
|
|
2864
|
+
"category": "counted_custom",
|
|
2865
|
+
"module": "flopscope.stats",
|
|
2866
|
+
"notes": "Cauchy CDF; cost = numel(input).",
|
|
2867
|
+
},
|
|
2868
|
+
"stats.cauchy.ppf": {
|
|
2869
|
+
"category": "counted_custom",
|
|
2870
|
+
"module": "flopscope.stats",
|
|
2871
|
+
"notes": "Cauchy PPF; cost = numel(input).",
|
|
2872
|
+
},
|
|
2873
|
+
"stats.logistic.pdf": {
|
|
2874
|
+
"category": "counted_custom",
|
|
2875
|
+
"module": "flopscope.stats",
|
|
2876
|
+
"notes": "Logistic PDF; cost = numel(input).",
|
|
2877
|
+
},
|
|
2878
|
+
"stats.logistic.cdf": {
|
|
2879
|
+
"category": "counted_custom",
|
|
2880
|
+
"module": "flopscope.stats",
|
|
2881
|
+
"notes": "Logistic CDF; cost = numel(input).",
|
|
2882
|
+
},
|
|
2883
|
+
"stats.logistic.ppf": {
|
|
2884
|
+
"category": "counted_custom",
|
|
2885
|
+
"module": "flopscope.stats",
|
|
2886
|
+
"notes": "Logistic PPF; cost = numel(input).",
|
|
2887
|
+
},
|
|
2888
|
+
"stats.laplace.pdf": {
|
|
2889
|
+
"category": "counted_custom",
|
|
2890
|
+
"module": "flopscope.stats",
|
|
2891
|
+
"notes": "Laplace PDF; cost = numel(input).",
|
|
2892
|
+
},
|
|
2893
|
+
"stats.laplace.cdf": {
|
|
2894
|
+
"category": "counted_custom",
|
|
2895
|
+
"module": "flopscope.stats",
|
|
2896
|
+
"notes": "Laplace CDF; cost = numel(input).",
|
|
2897
|
+
},
|
|
2898
|
+
"stats.laplace.ppf": {
|
|
2899
|
+
"category": "counted_custom",
|
|
2900
|
+
"module": "flopscope.stats",
|
|
2901
|
+
"notes": "Laplace PPF; cost = numel(input).",
|
|
2902
|
+
},
|
|
2903
|
+
"stats.lognorm.pdf": {
|
|
2904
|
+
"category": "counted_custom",
|
|
2905
|
+
"module": "flopscope.stats",
|
|
2906
|
+
"notes": "Log-normal PDF; cost = numel(input).",
|
|
2907
|
+
},
|
|
2908
|
+
"stats.lognorm.cdf": {
|
|
2909
|
+
"category": "counted_custom",
|
|
2910
|
+
"module": "flopscope.stats",
|
|
2911
|
+
"notes": "Log-normal CDF; cost = numel(input).",
|
|
2912
|
+
},
|
|
2913
|
+
"stats.lognorm.ppf": {
|
|
2914
|
+
"category": "counted_custom",
|
|
2915
|
+
"module": "flopscope.stats",
|
|
2916
|
+
"notes": "Log-normal PPF; cost = numel(input).",
|
|
2917
|
+
},
|
|
2918
|
+
"stats.truncnorm.pdf": {
|
|
2919
|
+
"category": "counted_custom",
|
|
2920
|
+
"module": "flopscope.stats",
|
|
2921
|
+
"notes": "Truncated normal PDF; cost = numel(input).",
|
|
2922
|
+
},
|
|
2923
|
+
"stats.truncnorm.cdf": {
|
|
2924
|
+
"category": "counted_custom",
|
|
2925
|
+
"module": "flopscope.stats",
|
|
2926
|
+
"notes": "Truncated normal CDF; cost = numel(input).",
|
|
2927
|
+
},
|
|
2928
|
+
"stats.truncnorm.ppf": {
|
|
2929
|
+
"category": "counted_custom",
|
|
2930
|
+
"module": "flopscope.stats",
|
|
2931
|
+
"notes": "Truncated normal PPF; cost = numel(input).",
|
|
2932
|
+
},
|
|
2933
|
+
# ------------------------------------------------------------------
|
|
2934
|
+
# blacklisted — poly functions
|
|
2935
|
+
# ------------------------------------------------------------------
|
|
2936
|
+
"poly": {
|
|
2937
|
+
"category": "counted_custom",
|
|
2938
|
+
"module": "flopscope._polynomial",
|
|
2939
|
+
"notes": "Polynomial from roots. Cost: $n^2$ FLOPs.",
|
|
2940
|
+
},
|
|
2941
|
+
"roots": {
|
|
2942
|
+
"category": "counted_custom",
|
|
2943
|
+
"module": "flopscope._polynomial",
|
|
2944
|
+
"notes": "Return roots of polynomial with given coefficients. Cost: $n^3$ (companion matrix eig, simplified).",
|
|
2945
|
+
},
|
|
2946
|
+
"polyadd": {
|
|
2947
|
+
"category": "counted_custom",
|
|
2948
|
+
"module": "flopscope._polynomial",
|
|
2949
|
+
"notes": "Add two polynomials. Cost: max(n1, n2) FLOPs.",
|
|
2950
|
+
},
|
|
2951
|
+
"polyder": {
|
|
2952
|
+
"category": "counted_custom",
|
|
2953
|
+
"module": "flopscope._polynomial",
|
|
2954
|
+
"notes": "Differentiate polynomial. Cost: n FLOPs.",
|
|
2955
|
+
},
|
|
2956
|
+
"polydiv": {
|
|
2957
|
+
"category": "counted_custom",
|
|
2958
|
+
"module": "flopscope._polynomial",
|
|
2959
|
+
"notes": "Divide one polynomial by another. Cost: n1 * n2 FLOPs.",
|
|
2960
|
+
},
|
|
2961
|
+
"polyfit": {
|
|
2962
|
+
"category": "counted_custom",
|
|
2963
|
+
"module": "flopscope._polynomial",
|
|
2964
|
+
"notes": "Least squares polynomial fit. Cost: 2 * m * (deg+1)^2 FLOPs.",
|
|
2965
|
+
},
|
|
2966
|
+
"polyint": {
|
|
2967
|
+
"category": "counted_custom",
|
|
2968
|
+
"module": "flopscope._polynomial",
|
|
2969
|
+
"notes": "Integrate polynomial. Cost: n FLOPs.",
|
|
2970
|
+
},
|
|
2971
|
+
"polymul": {
|
|
2972
|
+
"category": "counted_custom",
|
|
2973
|
+
"module": "flopscope._polynomial",
|
|
2974
|
+
"notes": "Multiply polynomials. Cost: n1 * n2 FLOPs.",
|
|
2975
|
+
},
|
|
2976
|
+
"polysub": {
|
|
2977
|
+
"category": "counted_custom",
|
|
2978
|
+
"module": "flopscope._polynomial",
|
|
2979
|
+
"notes": "Difference (subtraction) of two polynomials. Cost: max(n1, n2) FLOPs.",
|
|
2980
|
+
},
|
|
2981
|
+
"polyval": {
|
|
2982
|
+
"category": "counted_custom",
|
|
2983
|
+
"module": "flopscope._polynomial",
|
|
2984
|
+
"notes": "Evaluate polynomial at given points. Cost: $2 \\cdot m \\cdot \\text{deg}$ (Horner's method, FMA=2).",
|
|
2985
|
+
},
|
|
2986
|
+
# counted_custom — window functions
|
|
2987
|
+
"bartlett": {
|
|
2988
|
+
"category": "counted_custom",
|
|
2989
|
+
"module": "flopscope._window",
|
|
2990
|
+
"notes": "Bartlett window. Cost: n (one linear eval per sample).",
|
|
2991
|
+
},
|
|
2992
|
+
"blackman": {
|
|
2993
|
+
"category": "counted_custom",
|
|
2994
|
+
"module": "flopscope._window",
|
|
2995
|
+
"notes": "Blackman window. Cost: 3*n (three cosine terms per sample).",
|
|
2996
|
+
},
|
|
2997
|
+
"hamming": {
|
|
2998
|
+
"category": "counted_custom",
|
|
2999
|
+
"module": "flopscope._window",
|
|
3000
|
+
"notes": "Hamming window. Cost: n (one cosine per sample).",
|
|
3001
|
+
},
|
|
3002
|
+
"hanning": {
|
|
3003
|
+
"category": "counted_custom",
|
|
3004
|
+
"module": "flopscope._window",
|
|
3005
|
+
"notes": "Hanning window. Cost: n (one cosine per sample).",
|
|
3006
|
+
},
|
|
3007
|
+
"kaiser": {
|
|
3008
|
+
"category": "counted_custom",
|
|
3009
|
+
"module": "flopscope._window",
|
|
3010
|
+
"notes": "Kaiser window. Cost: 3*n (Bessel function eval per sample).",
|
|
3011
|
+
},
|
|
3012
|
+
# blacklisted — IO
|
|
3013
|
+
"genfromtxt": {
|
|
3014
|
+
"category": "blacklisted",
|
|
3015
|
+
"module": "numpy",
|
|
3016
|
+
"notes": "Load data from text file with missing values. Not supported.",
|
|
3017
|
+
},
|
|
3018
|
+
"loadtxt": {
|
|
3019
|
+
"category": "blacklisted",
|
|
3020
|
+
"module": "numpy",
|
|
3021
|
+
"notes": "Load data from text file. Not supported.",
|
|
3022
|
+
},
|
|
3023
|
+
"load": {
|
|
3024
|
+
"category": "blacklisted",
|
|
3025
|
+
"module": "numpy",
|
|
3026
|
+
"notes": "Load arrays from .npy/.npz files. Not supported.",
|
|
3027
|
+
},
|
|
3028
|
+
"save": {
|
|
3029
|
+
"category": "blacklisted",
|
|
3030
|
+
"module": "numpy",
|
|
3031
|
+
"notes": "Save array to .npy file. Not supported.",
|
|
3032
|
+
},
|
|
3033
|
+
"savetxt": {
|
|
3034
|
+
"category": "blacklisted",
|
|
3035
|
+
"module": "numpy",
|
|
3036
|
+
"notes": "Save array to text file. Not supported.",
|
|
3037
|
+
},
|
|
3038
|
+
"savez": {
|
|
3039
|
+
"category": "blacklisted",
|
|
3040
|
+
"module": "numpy",
|
|
3041
|
+
"notes": "Save multiple arrays to .npz file. Not supported.",
|
|
3042
|
+
},
|
|
3043
|
+
"savez_compressed": {
|
|
3044
|
+
"category": "blacklisted",
|
|
3045
|
+
"module": "numpy",
|
|
3046
|
+
"notes": "Save multiple arrays to compressed .npz file. Not supported.",
|
|
3047
|
+
},
|
|
3048
|
+
# blacklisted — config / runtime
|
|
3049
|
+
"show_config": {
|
|
3050
|
+
"category": "blacklisted",
|
|
3051
|
+
"module": "numpy",
|
|
3052
|
+
"notes": "Show NumPy build configuration. Not supported.",
|
|
3053
|
+
},
|
|
3054
|
+
"show_runtime": {
|
|
3055
|
+
"category": "blacklisted",
|
|
3056
|
+
"module": "numpy",
|
|
3057
|
+
"notes": "Show runtime info. Not supported.",
|
|
3058
|
+
},
|
|
3059
|
+
"get_include": {
|
|
3060
|
+
"category": "blacklisted",
|
|
3061
|
+
"module": "numpy",
|
|
3062
|
+
"notes": "Return directory containing NumPy C header files. Not supported.",
|
|
3063
|
+
},
|
|
3064
|
+
"getbufsize": {
|
|
3065
|
+
"category": "blacklisted",
|
|
3066
|
+
"module": "numpy",
|
|
3067
|
+
"notes": "Return size of buffer used in ufuncs. Not supported.",
|
|
3068
|
+
},
|
|
3069
|
+
"setbufsize": {
|
|
3070
|
+
"category": "blacklisted",
|
|
3071
|
+
"module": "numpy",
|
|
3072
|
+
"notes": "Set size of buffer used in ufuncs. Not supported.",
|
|
3073
|
+
},
|
|
3074
|
+
"geterr": {
|
|
3075
|
+
"category": "blacklisted",
|
|
3076
|
+
"module": "numpy",
|
|
3077
|
+
"notes": "Get current way of handling floating-point errors. Not supported.",
|
|
3078
|
+
},
|
|
3079
|
+
"seterr": {
|
|
3080
|
+
"category": "blacklisted",
|
|
3081
|
+
"module": "numpy",
|
|
3082
|
+
"notes": "Set how floating-point errors are handled. Not supported.",
|
|
3083
|
+
},
|
|
3084
|
+
"geterrcall": {
|
|
3085
|
+
"category": "blacklisted",
|
|
3086
|
+
"module": "numpy",
|
|
3087
|
+
"notes": "Return current callback function for floating-point errors. Not supported.",
|
|
3088
|
+
},
|
|
3089
|
+
"seterrcall": {
|
|
3090
|
+
"category": "blacklisted",
|
|
3091
|
+
"module": "numpy",
|
|
3092
|
+
"notes": "Set callback function for floating-point errors. Not supported.",
|
|
3093
|
+
},
|
|
3094
|
+
# blacklisted — advanced/meta
|
|
3095
|
+
"asmatrix": {
|
|
3096
|
+
"category": "blacklisted",
|
|
3097
|
+
"module": "numpy",
|
|
3098
|
+
"notes": "Interpret input as matrix (deprecated). Not supported.",
|
|
3099
|
+
},
|
|
3100
|
+
"nested_iters": {
|
|
3101
|
+
"category": "blacklisted",
|
|
3102
|
+
"module": "numpy",
|
|
3103
|
+
"notes": "Create nested iterators for multi-index broadcasting. Not supported.",
|
|
3104
|
+
},
|
|
3105
|
+
"frompyfunc": {
|
|
3106
|
+
"category": "blacklisted",
|
|
3107
|
+
"module": "numpy",
|
|
3108
|
+
"notes": "Take arbitrary Python function and return NumPy ufunc. Not supported.",
|
|
3109
|
+
},
|
|
3110
|
+
"piecewise": {
|
|
3111
|
+
"category": "counted_custom",
|
|
3112
|
+
"module": "numpy",
|
|
3113
|
+
"notes": "Piecewise function. Cost: numel(input).",
|
|
3114
|
+
},
|
|
3115
|
+
"apply_along_axis": {
|
|
3116
|
+
"category": "counted_custom",
|
|
3117
|
+
"module": "numpy",
|
|
3118
|
+
"notes": "Apply function along axis. Cost: numel(output). Inner function costs tracked separately.",
|
|
3119
|
+
},
|
|
3120
|
+
"apply_over_axes": {
|
|
3121
|
+
"category": "counted_custom",
|
|
3122
|
+
"module": "numpy",
|
|
3123
|
+
"notes": "Apply function over multiple axes. Cost: numel(output).",
|
|
3124
|
+
},
|
|
3125
|
+
# blacklisted — datetime
|
|
3126
|
+
"datetime_as_string": {
|
|
3127
|
+
"category": "blacklisted",
|
|
3128
|
+
"module": "numpy",
|
|
3129
|
+
"notes": "Convert datetime array to string representation. Not supported.",
|
|
3130
|
+
},
|
|
3131
|
+
"datetime_data": {
|
|
3132
|
+
"category": "blacklisted",
|
|
3133
|
+
"module": "numpy",
|
|
3134
|
+
"notes": "Get information about the step size of datetime dtype. Not supported.",
|
|
3135
|
+
},
|
|
3136
|
+
"busday_count": {
|
|
3137
|
+
"category": "blacklisted",
|
|
3138
|
+
"module": "numpy",
|
|
3139
|
+
"notes": "Count valid days between begindate and enddate. Not supported.",
|
|
3140
|
+
},
|
|
3141
|
+
"busday_offset": {
|
|
3142
|
+
"category": "blacklisted",
|
|
3143
|
+
"module": "numpy",
|
|
3144
|
+
"notes": "Apply offset to dates subject to valid day rules. Not supported.",
|
|
3145
|
+
},
|
|
3146
|
+
"is_busday": {
|
|
3147
|
+
"category": "blacklisted",
|
|
3148
|
+
"module": "numpy",
|
|
3149
|
+
"notes": "Calculates which of given dates are valid days. Not supported.",
|
|
3150
|
+
},
|
|
3151
|
+
# blacklisted — print/string formatting
|
|
3152
|
+
"array2string": {
|
|
3153
|
+
"category": "blacklisted",
|
|
3154
|
+
"module": "numpy",
|
|
3155
|
+
"notes": "Return string representation of array. Not supported.",
|
|
3156
|
+
},
|
|
3157
|
+
"array_repr": {
|
|
3158
|
+
"category": "blacklisted",
|
|
3159
|
+
"module": "numpy",
|
|
3160
|
+
"notes": "Return string representation of array. Not supported.",
|
|
3161
|
+
},
|
|
3162
|
+
"array_str": {
|
|
3163
|
+
"category": "blacklisted",
|
|
3164
|
+
"module": "numpy",
|
|
3165
|
+
"notes": "Return string representation of data in array. Not supported.",
|
|
3166
|
+
},
|
|
3167
|
+
"format_float_positional": {
|
|
3168
|
+
"category": "blacklisted",
|
|
3169
|
+
"module": "numpy",
|
|
3170
|
+
"notes": "Format floating point scalar as decimal string. Not supported.",
|
|
3171
|
+
},
|
|
3172
|
+
"format_float_scientific": {
|
|
3173
|
+
"category": "blacklisted",
|
|
3174
|
+
"module": "numpy",
|
|
3175
|
+
"notes": "Format floating point scalar as scientific notation. Not supported.",
|
|
3176
|
+
},
|
|
3177
|
+
"unwrap": {
|
|
3178
|
+
"category": "counted_custom",
|
|
3179
|
+
"module": "flopscope._unwrap",
|
|
3180
|
+
"notes": "Phase unwrap. Cost: $\\text{numel}(\\text{input})$ (diff + conditional adjustment).",
|
|
3181
|
+
},
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3184
|
+
|
|
3185
|
+
# ---------------------------------------------------------------------------
|
|
3186
|
+
# Utility
|
|
3187
|
+
# ---------------------------------------------------------------------------
|
|
3188
|
+
|
|
3189
|
+
|
|
3190
|
+
def make_module_getattr(module_prefix: str, module_label: str):
|
|
3191
|
+
"""Create a __getattr__ that consults the registry."""
|
|
3192
|
+
|
|
3193
|
+
def __getattr__(name: str):
|
|
3194
|
+
qualified = f"{module_prefix}{name}" if module_prefix else name
|
|
3195
|
+
if qualified in REGISTRY:
|
|
3196
|
+
entry = REGISTRY[qualified]
|
|
3197
|
+
cat = entry["category"]
|
|
3198
|
+
notes = entry.get("notes", "")
|
|
3199
|
+
if cat == "blacklisted":
|
|
3200
|
+
raise AttributeError(
|
|
3201
|
+
f"{module_label} does not support '{name}' (blacklisted). {notes}"
|
|
3202
|
+
)
|
|
3203
|
+
if cat == "unclassified":
|
|
3204
|
+
raise AttributeError(
|
|
3205
|
+
f"{module_label} has not yet classified '{name}'. "
|
|
3206
|
+
f"Please report this at https://github.com/AIcrowd/flopscope/issues"
|
|
3207
|
+
)
|
|
3208
|
+
raise AttributeError(
|
|
3209
|
+
f"'{name}' is registered but not yet implemented in {module_label}. {notes}"
|
|
3210
|
+
)
|
|
3211
|
+
raise AttributeError(
|
|
3212
|
+
f"{module_label} does not provide '{name}'. "
|
|
3213
|
+
f"See https://github.com/AIcrowd/flopscope for supported operations."
|
|
3214
|
+
)
|
|
3215
|
+
|
|
3216
|
+
return __getattr__
|