galley-jl-python 0.1.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.
@@ -0,0 +1,386 @@
1
+ {
2
+ "julia": "=1.12.2",
3
+ "packages": {
4
+ "AbstractTrees": {
5
+ "uuid": "1520ce14-60c1-5f80-bbc7-55ef81b5835c",
6
+ "version": "=0.4.5"
7
+ },
8
+ "AcceleratedKernels": {
9
+ "uuid": "6a4ca0a5-0e36-4168-a932-d9be78d558f1",
10
+ "version": "=0.4.3"
11
+ },
12
+ "Accessors": {
13
+ "uuid": "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697",
14
+ "version": "=0.1.45"
15
+ },
16
+ "Adapt": {
17
+ "uuid": "79e6a3ab-5dfb-504d-930d-738a2a938a0e",
18
+ "version": "=4.7.1"
19
+ },
20
+ "AliasTables": {
21
+ "uuid": "66dad0bd-aa9a-41b7-9441-69ab47430ed8",
22
+ "version": "=1.1.3"
23
+ },
24
+ "ArgCheck": {
25
+ "uuid": "dce04be8-c92d-5529-be00-80e4d2c0e197",
26
+ "version": "=2.5.0"
27
+ },
28
+ "Atomix": {
29
+ "uuid": "a9b6321e-bd34-4604-b9c9-b65b8de01458",
30
+ "version": "=1.2.1"
31
+ },
32
+ "AutoHashEquals": {
33
+ "uuid": "15f4f7f2-30c1-5605-9d31-71845cf9641f",
34
+ "version": "=2.2.0"
35
+ },
36
+ "CommonSolve": {
37
+ "uuid": "38540f10-b2f7-11e9-35d8-d573e4eb0ff2",
38
+ "version": "=0.2.14"
39
+ },
40
+ "Compat": {
41
+ "uuid": "34da2185-b29b-5c13-b0c7-acf172513d20",
42
+ "version": "=4.18.1"
43
+ },
44
+ "CompositionsBase": {
45
+ "uuid": "a33af91c-f02d-484b-be07-31d278c5ca2b",
46
+ "version": "=0.1.2"
47
+ },
48
+ "CondaPkg": {
49
+ "uuid": "992eb4ea-22a4-4c89-a5bb-47a3300528ab",
50
+ "version": "=0.2.36"
51
+ },
52
+ "ConstructionBase": {
53
+ "uuid": "187b0558-2788-49d3-abe0-74a17ed4e7c9",
54
+ "version": "=1.6.0"
55
+ },
56
+ "DataAPI": {
57
+ "uuid": "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a",
58
+ "version": "=1.16.0"
59
+ },
60
+ "DataStructures": {
61
+ "uuid": "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8",
62
+ "version": "=0.19.6"
63
+ },
64
+ "DataValueInterfaces": {
65
+ "uuid": "e2d170a0-9d28-54be-80f0-106bbe20a464",
66
+ "version": "=1.0.0"
67
+ },
68
+ "Distributions": {
69
+ "uuid": "31c24e10-a181-5473-b8eb-7969acd0382f",
70
+ "version": "=0.25.131"
71
+ },
72
+ "DocStringExtensions": {
73
+ "uuid": "ffbed154-4ef7-542d-bbb7-c09d3a79fcae",
74
+ "version": "=0.9.5"
75
+ },
76
+ "FileIO": {
77
+ "uuid": "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549",
78
+ "version": "=1.20.0"
79
+ },
80
+ "FillArrays": {
81
+ "uuid": "1a297f60-69ca-5386-bcde-b61e274b549b",
82
+ "version": "=1.17.1"
83
+ },
84
+ "Finch": {
85
+ "rev": "368602490c2a106778afc9ca9d567a2201393012",
86
+ "url": "https://github.com/finch-tensor/Finch.jl",
87
+ "uuid": "9177782c-1635-4eb9-9bfb-d9dfa25e6bce"
88
+ },
89
+ "GPUArraysCore": {
90
+ "uuid": "46192b85-c4d5-4398-a991-12ede77f4527",
91
+ "version": "=0.2.1"
92
+ },
93
+ "Gamma": {
94
+ "uuid": "a0844989-3bd2-4988-8bea-c9407ab0941b",
95
+ "version": "=1.2.0"
96
+ },
97
+ "HDF5": {
98
+ "uuid": "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f",
99
+ "version": "=0.17.4"
100
+ },
101
+ "HDF5_jll": {
102
+ "uuid": "0234f1f7-429e-5d53-9886-15a909be8d59",
103
+ "version": "=2.2.2"
104
+ },
105
+ "Hwloc_jll": {
106
+ "uuid": "e33a78d0-f292-5ffc-b300-72abe9b543c8",
107
+ "version": "=2.14.1"
108
+ },
109
+ "HypergeometricFunctions": {
110
+ "uuid": "34004b35-14d8-5ef3-9330-4cdb6864b03a",
111
+ "version": "=0.3.30"
112
+ },
113
+ "InverseFunctions": {
114
+ "uuid": "3587e190-3f89-42d0-90ee-14403ec27112",
115
+ "version": "=0.1.17"
116
+ },
117
+ "IrrationalConstants": {
118
+ "uuid": "92d709cd-6900-40b7-9082-c6be49f344b6",
119
+ "version": "=0.2.6"
120
+ },
121
+ "IterTools": {
122
+ "uuid": "c8e1da08-722c-5040-9ed9-7db0dc04731e",
123
+ "version": "=1.10.0"
124
+ },
125
+ "IteratorInterfaceExtensions": {
126
+ "uuid": "82899510-4779-5014-852e-03e436cf321d",
127
+ "version": "=1.0.0"
128
+ },
129
+ "JLLWrappers": {
130
+ "uuid": "692b3bcd-3c85-4b1f-b108-f13ce0eb3210",
131
+ "version": "=1.8.0"
132
+ },
133
+ "JSON": {
134
+ "uuid": "682c06a0-de6a-54ab-a142-c8b1cf79cde6",
135
+ "version": "=1.9.0"
136
+ },
137
+ "KernelAbstractions": {
138
+ "uuid": "63c18a36-062a-441e-b654-da1e3ab1ce7c",
139
+ "version": "=0.9.42"
140
+ },
141
+ "Libiconv_jll": {
142
+ "uuid": "94ce4f54-9a6c-5748-9c1c-f9c7231a4531",
143
+ "version": "=1.18.0"
144
+ },
145
+ "LogExpFunctions": {
146
+ "uuid": "2ab3a3ac-af41-5b50-aa03-7779005ae688",
147
+ "version": "=1.0.2"
148
+ },
149
+ "MPIABI_jll": {
150
+ "uuid": "b5ada748-db0f-5fc0-8972-9331c762740c",
151
+ "version": "=1.0.0"
152
+ },
153
+ "MPICH_jll": {
154
+ "uuid": "7cb0a576-ebde-5e09-9194-50597f1243b4",
155
+ "version": "=5.0.1"
156
+ },
157
+ "MPIPreferences": {
158
+ "uuid": "3da0fdf6-3ccc-4f1b-acd9-58baa6c99267",
159
+ "version": "=0.1.12"
160
+ },
161
+ "MPItrampoline_jll": {
162
+ "uuid": "f1f71cc9-e9ae-5b93-9b94-4fe0e1ad3748",
163
+ "version": "=5.5.6"
164
+ },
165
+ "MacroTools": {
166
+ "uuid": "1914dd2f-81c6-5fcd-8719-6d5c9610ff09",
167
+ "version": "=0.5.16"
168
+ },
169
+ "MicroMamba": {
170
+ "uuid": "0b3b1443-0f03-428d-bdfb-f27f9c1191ea",
171
+ "version": "=0.1.15"
172
+ },
173
+ "MicrosoftMPI_jll": {
174
+ "uuid": "9237b28f-5490-5468-be7b-bb81f5f5e6cf",
175
+ "version": "=10.1.4"
176
+ },
177
+ "Missings": {
178
+ "uuid": "e1d29d7a-bbdc-5cf2-9ac0-f12de2c33e28",
179
+ "version": "=1.2.0"
180
+ },
181
+ "NPZ": {
182
+ "uuid": "15e1cf62-19b3-5cfa-8e77-841668bca605",
183
+ "version": "=0.4.3"
184
+ },
185
+ "OpenMPI_jll": {
186
+ "uuid": "fe0851c0-eecd-5654-98d4-656369965a5c",
187
+ "version": "=5.0.12"
188
+ },
189
+ "OpenSpecFun_jll": {
190
+ "uuid": "efe28fd5-8261-553b-a9e1-b2916fc3738e",
191
+ "version": "=0.5.6"
192
+ },
193
+ "OrderedCollections": {
194
+ "uuid": "bac558e1-5e72-5ebc-8fee-abe8a469f55d",
195
+ "version": "=2.0.1"
196
+ },
197
+ "PDMats": {
198
+ "uuid": "90014a1f-27ba-587c-ab20-58faa44d9150",
199
+ "version": "=0.11.41"
200
+ },
201
+ "Parsers": {
202
+ "uuid": "69de0a69-1ddd-5017-9359-2bf0b02dc9f0",
203
+ "version": "=3.0.0"
204
+ },
205
+ "Pidfile": {
206
+ "uuid": "fa939f87-e72e-5be4-a000-7fc836dbe307",
207
+ "version": "=1.3.0"
208
+ },
209
+ "PrecompileTools": {
210
+ "uuid": "aea7be01-6a6a-4083-8856-8a6e6704d82a",
211
+ "version": "=1.3.4"
212
+ },
213
+ "Preferences": {
214
+ "uuid": "21216c6a-2e73-6563-6e65-726566657250",
215
+ "version": "=1.6.0"
216
+ },
217
+ "PtrArrays": {
218
+ "uuid": "43287f4e-b6f4-7ad1-bb20-aadabca52c3d",
219
+ "version": "=1.4.0"
220
+ },
221
+ "QuadGK": {
222
+ "uuid": "1fd47b50-473d-5c70-9696-f719f8f3bcdc",
223
+ "version": "=2.11.3"
224
+ },
225
+ "Reexport": {
226
+ "uuid": "189a3867-3050-52da-a836-e630ba90ab69",
227
+ "version": "=1.2.2"
228
+ },
229
+ "Requires": {
230
+ "uuid": "ae029012-a4dd-5104-9daa-d747884805df",
231
+ "version": "=1.3.1"
232
+ },
233
+ "RewriteTools": {
234
+ "uuid": "5969e224-3634-4c61-9f66-721b69e98b8a",
235
+ "version": "=0.2.4"
236
+ },
237
+ "Rmath": {
238
+ "uuid": "79098fc4-a85e-5d69-aa6a-4863f24498fa",
239
+ "version": "=0.9.0"
240
+ },
241
+ "Rmath_jll": {
242
+ "uuid": "f50d1b31-88e8-58de-be2c-1cc44531875f",
243
+ "version": "=0.5.2"
244
+ },
245
+ "Roots": {
246
+ "uuid": "f2b01f46-fcfa-551c-844a-d8ac1e96c665",
247
+ "version": "=3.0.8"
248
+ },
249
+ "Scratch": {
250
+ "uuid": "6c6a2e73-6563-6170-7368-637461726353",
251
+ "version": "=1.3.0"
252
+ },
253
+ "SortingAlgorithms": {
254
+ "uuid": "a2af1166-a08f-5f64-846c-94a0d3cef48c",
255
+ "version": "=1.2.3"
256
+ },
257
+ "SpecialFunctions": {
258
+ "uuid": "276daf66-3868-5448-9aa4-cd146d93841b",
259
+ "version": "=2.9.0"
260
+ },
261
+ "StaticArrays": {
262
+ "uuid": "90137ffa-7385-5640-81b9-e52037218182",
263
+ "version": "=1.9.22"
264
+ },
265
+ "StaticArraysCore": {
266
+ "uuid": "1e83bf80-4336-4d27-bf5d-d5a4f845583c",
267
+ "version": "=1.4.4"
268
+ },
269
+ "Statistics": {
270
+ "uuid": "10745b16-79ce-11e8-11f9-7d13ad32a3b2",
271
+ "version": "=1.11.5"
272
+ },
273
+ "StatsAPI": {
274
+ "uuid": "82ae8749-77ed-4fe6-ae5f-f523153014b0",
275
+ "version": "=1.8.0"
276
+ },
277
+ "StatsBase": {
278
+ "uuid": "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91",
279
+ "version": "=0.34.13"
280
+ },
281
+ "StatsFuns": {
282
+ "uuid": "4c63d2b9-4356-54db-8cca-17b64c39e42c",
283
+ "version": "=2.2.1"
284
+ },
285
+ "StructUtils": {
286
+ "uuid": "ec057cc2-7a8d-4b58-b3b3-92acb9f63b42",
287
+ "version": "=2.9.2"
288
+ },
289
+ "SyntaxInterface": {
290
+ "uuid": "b33eeca9-aacb-4496-a840-e75f1646a4fb",
291
+ "version": "=0.2.1"
292
+ },
293
+ "TableTraits": {
294
+ "uuid": "3783bdb8-4a98-5b6b-af9a-565f29a5fe9c",
295
+ "version": "=1.0.1"
296
+ },
297
+ "Tables": {
298
+ "uuid": "bd369af6-aec1-5ad0-b16a-f7cc5008161c",
299
+ "version": "=1.14.0"
300
+ },
301
+ "TensorMarket": {
302
+ "uuid": "8b7d4fe7-0b45-4d0d-9dd8-5cc9b23b4b77",
303
+ "version": "=0.2.2"
304
+ },
305
+ "UnsafeAtomics": {
306
+ "uuid": "013be700-e6cd-48c3-b4a1-df204f14c38f",
307
+ "version": "=0.3.2"
308
+ },
309
+ "UnsafePointers": {
310
+ "uuid": "e17b2a0c-0bdf-430a-bd0c-3a23cae4ff39",
311
+ "version": "=1.0.0"
312
+ },
313
+ "XML2_jll": {
314
+ "uuid": "02c8fc9c-b97f-50b9-bbe4-9be30ff0a78a",
315
+ "version": "=2.15.4"
316
+ },
317
+ "Xorg_libpciaccess_jll": {
318
+ "uuid": "a65dc6b1-eb27-53a1-bb3e-dea574b5389e",
319
+ "version": "=0.19.0"
320
+ },
321
+ "ZipFile": {
322
+ "uuid": "a5390f91-8eb1-5f08-bee0-b1d1ffed6cea",
323
+ "version": "=0.10.1"
324
+ },
325
+ "aws_c_auth_jll": {
326
+ "uuid": "2b3700d1-4306-52e2-a478-c162f0c514be",
327
+ "version": "=0.9.6"
328
+ },
329
+ "aws_c_cal_jll": {
330
+ "uuid": "70f11efc-bab2-57f1-b0f3-22aad4e67c4b",
331
+ "version": "=0.9.13"
332
+ },
333
+ "aws_c_common_jll": {
334
+ "uuid": "73048d1d-b8c4-5092-a58d-866c5e8d1e50",
335
+ "version": "=0.12.6"
336
+ },
337
+ "aws_c_compression_jll": {
338
+ "uuid": "73a04cd5-f3d7-5bac-9290-e8adb709f224",
339
+ "version": "=0.3.2"
340
+ },
341
+ "aws_c_http_jll": {
342
+ "uuid": "3254fc65-9028-534d-aa9d-d76d128babc6",
343
+ "version": "=0.10.15"
344
+ },
345
+ "aws_c_io_jll": {
346
+ "uuid": "13c41daa-f319-5298-b5eb-5754e0170d52",
347
+ "version": "=0.26.3"
348
+ },
349
+ "aws_c_s3_jll": {
350
+ "uuid": "bd1f34fb-993f-5903-a121-aaf302eed6d4",
351
+ "version": "=0.11.5"
352
+ },
353
+ "aws_c_sdkutils_jll": {
354
+ "uuid": "1282aa60-004d-510b-9f52-12498d409daa",
355
+ "version": "=0.2.4"
356
+ },
357
+ "aws_checksums_jll": {
358
+ "uuid": "b2a88e68-78e7-5e94-8c20-c02986ec140e",
359
+ "version": "=0.2.10"
360
+ },
361
+ "dlfcn_win32_jll": {
362
+ "uuid": "c4b69c83-5512-53e3-94e6-de98773c479f",
363
+ "version": "=1.4.2"
364
+ },
365
+ "libaec_jll": {
366
+ "uuid": "477f73a3-ac25-53e9-8cc3-50b2fa2566f0",
367
+ "version": "=1.1.7"
368
+ },
369
+ "micromamba_jll": {
370
+ "uuid": "f8abcde7-e9b7-5caa-b8af-a437887ae8e4",
371
+ "version": "=2.3.1"
372
+ },
373
+ "mpif_jll": {
374
+ "uuid": "9aeb927a-4695-514f-a259-621a69f20ec0",
375
+ "version": "=1.0.0"
376
+ },
377
+ "pixi_jll": {
378
+ "uuid": "4d7b5844-a134-5dcd-ac86-c8f19cd51bed",
379
+ "version": "=0.76.2"
380
+ },
381
+ "s2n_tls_jll": {
382
+ "uuid": "cddc5d3d-934d-5d3a-9747-62fc12ea3f48",
383
+ "version": "=1.7.10"
384
+ }
385
+ }
386
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "julia": "1.10 - 1.12",
3
+ "packages": {
4
+ "Finch": {
5
+ "dev": true,
6
+ "path": "../Finch.jl",
7
+ "uuid": "9177782c-1635-4eb9-9bfb-d9dfa25e6bce"
8
+ },
9
+ "HDF5": {
10
+ "uuid": "f67ccb44-e63f-5c2f-98bd-6dc0ccc4ba2f",
11
+ "version": "0.17.2"
12
+ },
13
+ "NPZ": {
14
+ "uuid": "15e1cf62-19b3-5cfa-8e77-841668bca605",
15
+ "version": "0.4.3"
16
+ },
17
+ "TensorMarket": {
18
+ "uuid": "8b7d4fe7-0b45-4d0d-9dd8-5cc9b23b4b77",
19
+ "version": "0.2.0"
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,110 @@
1
+ from .julia import jl
2
+ from .typing import DType, JuliaObj, OrderType
3
+
4
+
5
+ class _Display:
6
+ _obj: JuliaObj
7
+
8
+ def __repr__(self):
9
+ return jl.sprint(jl.show, self._obj)
10
+
11
+ def __str__(self):
12
+ return jl.sprint(jl.show, jl.MIME("text/plain"), self._obj)
13
+
14
+
15
+ # LEVEL
16
+
17
+
18
+ class AbstractLevel(_Display):
19
+ pass
20
+
21
+
22
+ # core levels
23
+
24
+
25
+ class Dense(AbstractLevel):
26
+ def __init__(self, lvl, shape=None):
27
+ args = [lvl._obj]
28
+ if shape is not None:
29
+ args.append(shape)
30
+ self._obj = jl.Dense(*args)
31
+
32
+
33
+ class Element(AbstractLevel):
34
+ def __init__(self, fill_value, data=None):
35
+ args = [fill_value]
36
+ if data is not None:
37
+ args.append(data)
38
+ self._obj = jl.Element(*args)
39
+
40
+
41
+ class Pattern(AbstractLevel):
42
+ def __init__(self):
43
+ self._obj = jl.Pattern()
44
+
45
+
46
+ # advanced levels
47
+
48
+
49
+ class SparseList(AbstractLevel):
50
+ def __init__(self, lvl):
51
+ self._obj = jl.SparseList(lvl._obj)
52
+
53
+
54
+ class SparseByteMap(AbstractLevel):
55
+ def __init__(self, lvl):
56
+ self._obj = jl.SparseByteMap(lvl._obj)
57
+
58
+
59
+ class RepeatRLE(AbstractLevel):
60
+ def __init__(self, lvl):
61
+ self._obj = jl.RepeatRLE(lvl._obj)
62
+
63
+
64
+ class SparseVBL(AbstractLevel):
65
+ def __init__(self, lvl):
66
+ self._obj = jl.SparseVBL(lvl._obj)
67
+
68
+
69
+ class SparseCOO(AbstractLevel):
70
+ def __init__(self, ndim, lvl):
71
+ self._obj = jl.SparseCOO[ndim](lvl._obj)
72
+
73
+
74
+ class SparseHash(AbstractLevel):
75
+ def __init__(self, ndim, lvl):
76
+ self._obj = jl.SparseHash[ndim](lvl._obj)
77
+
78
+
79
+ sparse_formats_names = (
80
+ "SparseList",
81
+ "Sparse",
82
+ "SparseHash",
83
+ "SparseCOO",
84
+ "SparseRLE",
85
+ "SparseVBL",
86
+ "SparseBand",
87
+ "SparsePoint",
88
+ "SparseInterval",
89
+ )
90
+
91
+
92
+ # STORAGE
93
+
94
+
95
+ class Storage:
96
+ def __init__(self, levels_descr: AbstractLevel, order: OrderType = None):
97
+ self.levels_descr = levels_descr
98
+ self.order = order if order is not None else "C"
99
+
100
+ def __str__(self) -> str:
101
+ return f"Storage(lvl={str(self.levels_descr)}, order={self.order})"
102
+
103
+
104
+ class DenseStorage(Storage):
105
+ def __init__(self, ndim: int, dtype: DType, order: OrderType = None):
106
+ lvl = Element(dtype(0))
107
+ for _ in range(ndim):
108
+ lvl = Dense(lvl)
109
+
110
+ super().__init__(levels_descr=lvl, order=order)
@@ -0,0 +1,3 @@
1
+ from ._linalg import vector_norm
2
+
3
+ __all__ = ["vector_norm"]
@@ -0,0 +1,26 @@
1
+ from numpy.core.numeric import normalize_axis_tuple
2
+
3
+ from ..julia import jl
4
+ from ..tensor import Tensor
5
+
6
+
7
+ def vector_norm(
8
+ x: Tensor,
9
+ /,
10
+ *,
11
+ axis: int | tuple[int, ...] | None = None,
12
+ keepdims: bool = False,
13
+ ord: float = 2,
14
+ ) -> Tensor:
15
+ if axis is not None:
16
+ axis = normalize_axis_tuple(axis, x.ndim)
17
+ if axis != tuple(range(x.ndim)):
18
+ raise ValueError(
19
+ "At the moment only `None` (vector norm of a flattened array) "
20
+ "is supported. Got: {axis}."
21
+ )
22
+
23
+ result = Tensor(jl.Finch.norm(x._obj, ord))
24
+ if keepdims:
25
+ result = result[tuple(None for _ in range(x.ndim))]
26
+ return result