egglog 6.0.0__cp311-none-win_amd64.whl → 6.1.0__cp311-none-win_amd64.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.
Potentially problematic release.
This version of egglog might be problematic. Click here for more details.
- egglog/bindings.cp311-win_amd64.pyd +0 -0
- egglog/bindings.pyi +25 -4
- egglog/builtins.py +116 -232
- egglog/declarations.py +11 -2
- egglog/egraph.py +66 -99
- egglog/examples/bool.py +1 -2
- egglog/examples/eqsat_basic.py +5 -8
- egglog/examples/fib.py +2 -2
- egglog/examples/lambda_.py +14 -26
- egglog/examples/matrix.py +2 -2
- egglog/examples/ndarrays.py +15 -28
- egglog/examples/resolution.py +1 -0
- egglog/examples/schedule_demo.py +1 -0
- egglog/exp/array_api.py +158 -307
- egglog/exp/array_api_numba.py +9 -12
- egglog/exp/array_api_program_gen.py +21 -44
- egglog/exp/program_gen.py +1 -0
- egglog/runtime.py +1 -1
- egglog/type_constraint_solver.py +1 -0
- {egglog-6.0.0.dist-info → egglog-6.1.0.dist-info}/METADATA +14 -14
- egglog-6.1.0.dist-info/RECORD +34 -0
- egglog-6.0.0.dist-info/RECORD +0 -34
- {egglog-6.0.0.dist-info → egglog-6.1.0.dist-info}/WHEEL +0 -0
- {egglog-6.0.0.dist-info → egglog-6.1.0.dist-info}/license_files/LICENSE +0 -0
egglog/examples/ndarrays.py
CHANGED
|
@@ -6,6 +6,7 @@ N-Dimensional Arrays
|
|
|
6
6
|
|
|
7
7
|
Example of building NDarray in the vein of Mathemetics of Arrays.
|
|
8
8
|
"""
|
|
9
|
+
|
|
9
10
|
from __future__ import annotations
|
|
10
11
|
|
|
11
12
|
from egglog import *
|
|
@@ -14,14 +15,11 @@ egraph = EGraph()
|
|
|
14
15
|
|
|
15
16
|
|
|
16
17
|
class Value(Expr):
|
|
17
|
-
def __init__(self, v: i64Like) -> None:
|
|
18
|
-
...
|
|
18
|
+
def __init__(self, v: i64Like) -> None: ...
|
|
19
19
|
|
|
20
|
-
def __mul__(self, other: Value) -> Value:
|
|
21
|
-
...
|
|
20
|
+
def __mul__(self, other: Value) -> Value: ...
|
|
22
21
|
|
|
23
|
-
def __add__(self, other: Value) -> Value:
|
|
24
|
-
...
|
|
22
|
+
def __add__(self, other: Value) -> Value: ...
|
|
25
23
|
|
|
26
24
|
|
|
27
25
|
i, j = vars_("i j", i64)
|
|
@@ -32,17 +30,13 @@ egraph.register(
|
|
|
32
30
|
|
|
33
31
|
|
|
34
32
|
class Values(Expr):
|
|
35
|
-
def __init__(self, v: Vec[Value]) -> None:
|
|
36
|
-
...
|
|
33
|
+
def __init__(self, v: Vec[Value]) -> None: ...
|
|
37
34
|
|
|
38
|
-
def __getitem__(self, idx: Value) -> Value:
|
|
39
|
-
...
|
|
35
|
+
def __getitem__(self, idx: Value) -> Value: ...
|
|
40
36
|
|
|
41
|
-
def length(self) -> Value:
|
|
42
|
-
...
|
|
37
|
+
def length(self) -> Value: ...
|
|
43
38
|
|
|
44
|
-
def concat(self, other: Values) -> Values:
|
|
45
|
-
...
|
|
39
|
+
def concat(self, other: Values) -> Values: ...
|
|
46
40
|
|
|
47
41
|
|
|
48
42
|
@egraph.register
|
|
@@ -59,16 +53,13 @@ class NDArray(Expr):
|
|
|
59
53
|
An n-dimensional array.
|
|
60
54
|
"""
|
|
61
55
|
|
|
62
|
-
def __getitem__(self, idx: Values) -> Value:
|
|
63
|
-
...
|
|
56
|
+
def __getitem__(self, idx: Values) -> Value: ...
|
|
64
57
|
|
|
65
|
-
def shape(self) -> Values:
|
|
66
|
-
...
|
|
58
|
+
def shape(self) -> Values: ...
|
|
67
59
|
|
|
68
60
|
|
|
69
61
|
@function
|
|
70
|
-
def arange(n: Value) -> NDArray:
|
|
71
|
-
...
|
|
62
|
+
def arange(n: Value) -> NDArray: ...
|
|
72
63
|
|
|
73
64
|
|
|
74
65
|
@egraph.register
|
|
@@ -94,8 +85,7 @@ assert_simplifies(arange(Value(10))[Values(Vec(Value(1)))], Value(1))
|
|
|
94
85
|
|
|
95
86
|
|
|
96
87
|
@function
|
|
97
|
-
def py_value(s: StringLike) -> Value:
|
|
98
|
-
...
|
|
88
|
+
def py_value(s: StringLike) -> Value: ...
|
|
99
89
|
|
|
100
90
|
|
|
101
91
|
@egraph.register
|
|
@@ -105,8 +95,7 @@ def _py_value(l: String, r: String):
|
|
|
105
95
|
|
|
106
96
|
|
|
107
97
|
@function
|
|
108
|
-
def py_values(s: StringLike) -> Values:
|
|
109
|
-
...
|
|
98
|
+
def py_values(s: StringLike) -> Values: ...
|
|
110
99
|
|
|
111
100
|
|
|
112
101
|
@egraph.register
|
|
@@ -117,8 +106,7 @@ def _py_values(l: String, r: String):
|
|
|
117
106
|
|
|
118
107
|
|
|
119
108
|
@function
|
|
120
|
-
def py_ndarray(s: StringLike) -> NDArray:
|
|
121
|
-
...
|
|
109
|
+
def py_ndarray(s: StringLike) -> NDArray: ...
|
|
122
110
|
|
|
123
111
|
|
|
124
112
|
@egraph.register
|
|
@@ -134,8 +122,7 @@ assert_simplifies(arange(py_value("x"))[py_values("y")], py_value("np.arange(x)[
|
|
|
134
122
|
|
|
135
123
|
|
|
136
124
|
@function
|
|
137
|
-
def cross(l: NDArray, r: NDArray) -> NDArray:
|
|
138
|
-
...
|
|
125
|
+
def cross(l: NDArray, r: NDArray) -> NDArray: ...
|
|
139
126
|
|
|
140
127
|
|
|
141
128
|
@egraph.register
|
egglog/examples/resolution.py
CHANGED