Skip to content

Commit 33338ca

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fee611c commit 33338ca

File tree

8 files changed

+25927
-26012
lines changed

8 files changed

+25927
-26012
lines changed

docs/explanation/2023_07_presentation.ipynb

Lines changed: 11973 additions & 12005 deletions
Large diffs are not rendered by default.

docs/explanation/2023_11_09_portland_state.ipynb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5+
"id": "7fb27b941602401d91542211134fc71a",
56
"metadata": {
67
"notebookRunGroups": {
78
"groupValue": "1"
@@ -457,6 +458,7 @@
457458
"outputs": [],
458459
"source": [
459460
"from __future__ import annotations\n",
461+
"\n",
460462
"from egglog import *\n",
461463
"\n",
462464
"egraph = EGraph()\n",
@@ -465,16 +467,13 @@
465467
"# 1. Describe domain with types & functions\n",
466468
"@egraph.class_\n",
467469
"class Num(Expr):\n",
468-
" def __init__(self, i: i64Like) -> None:\n",
469-
" ...\n",
470+
" def __init__(self, i: i64Like) -> None: ...\n",
470471
"\n",
471-
" def __add__(self, other: Num) -> Num:\n",
472-
" ...\n",
472+
" def __add__(self, other: Num) -> Num: ...\n",
473473
"\n",
474474
"\n",
475475
"@egraph.function(cost=20)\n",
476-
"def fib(x: i64Like) -> Num:\n",
477-
" ..."
476+
"def fib(x: i64Like) -> Num: ..."
478477
]
479478
},
480479
{
@@ -1406,16 +1405,17 @@
14061405
"outputs": [],
14071406
"source": [
14081407
"import timeit\n",
1408+
"\n",
14091409
"import pandas as pd\n",
14101410
"import seaborn as sns\n",
14111411
"\n",
14121412
"stmts = {\n",
14131413
" \"original\": \"run_lda(X_np, y_np)\",\n",
14141414
" \"numba\": \"numba_fn(X_np, y_np)\",\n",
14151415
"}\n",
1416-
"df = pd.DataFrame.from_dict(\n",
1417-
" {name: timeit.repeat(stmt, globals=globals(), number=1, repeat=10) for name, stmt in stmts.items()}\n",
1418-
")\n",
1416+
"df = pd.DataFrame.from_dict({\n",
1417+
" name: timeit.repeat(stmt, globals=globals(), number=1, repeat=10) for name, stmt in stmts.items()\n",
1418+
"})\n",
14191419
"df_melt = pd.melt(df, var_name=\"function\", value_name=\"time\")"
14201420
]
14211421
},

docs/explanation/2023_11_17_pytensor.ipynb

Lines changed: 2511 additions & 2533 deletions
Large diffs are not rendered by default.

docs/explanation/2023_11_pydata_lightning_talk.ipynb

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5+
"id": "7fb27b941602401d91542211134fc71a",
56
"metadata": {},
67
"source": [
78
"```{post} 2023-11-04\n",
@@ -12,6 +13,7 @@
1213
{
1314
"cell_type": "code",
1415
"execution_count": 1,
16+
"id": "acae54e37e7d407bbb7b55eff062a284",
1517
"metadata": {
1618
"tags": [
1719
"hide-input"
@@ -122,26 +124,23 @@
122124
"outputs": [],
123125
"source": [
124126
"from __future__ import annotations\n",
127+
"\n",
125128
"from egglog import *\n",
126129
"\n",
127130
"egraph = EGraph()\n",
128131
"\n",
129132
"\n",
130133
"@egraph.class_\n",
131134
"class NDArray(Expr):\n",
132-
" def __init__(self, i: i64Like) -> None:\n",
133-
" ...\n",
135+
" def __init__(self, i: i64Like) -> None: ...\n",
134136
"\n",
135-
" def __add__(self, other: NDArray) -> NDArray:\n",
136-
" ...\n",
137+
" def __add__(self, other: NDArray) -> NDArray: ...\n",
137138
"\n",
138-
" def __mul__(self, other: NDArray) -> NDArray:\n",
139-
" ...\n",
139+
" def __mul__(self, other: NDArray) -> NDArray: ...\n",
140140
"\n",
141141
"\n",
142142
"@egraph.function(cost=2)\n",
143-
"def arange(i: i64Like) -> NDArray:\n",
144-
" ...\n",
143+
"def arange(i: i64Like) -> NDArray: ...\n",
145144
"\n",
146145
"\n",
147146
"# Register rewrite rule that asserts for all values x of type NDArray\n",
@@ -6754,18 +6753,16 @@
67546753
"outputs": [],
67556754
"source": [
67566755
"import timeit\n",
6756+
"\n",
67576757
"import pandas as pd\n",
67586758
"\n",
67596759
"stmts = {\n",
67606760
" \"original\": \"run_lda(X_np, y_np)\",\n",
67616761
" \"numba\": \"numba_fn(X_np, y_np)\",\n",
67626762
"}\n",
6763-
"df = pd.DataFrame.from_dict(\n",
6764-
" {\n",
6765-
" name: timeit.repeat(stmt, globals=globals(), number=1, repeat=10)\n",
6766-
" for name, stmt in stmts.items()\n",
6767-
" }\n",
6768-
")"
6763+
"df = pd.DataFrame.from_dict({\n",
6764+
" name: timeit.repeat(stmt, globals=globals(), number=1, repeat=10) for name, stmt in stmts.items()\n",
6765+
"})"
67696766
]
67706767
},
67716768
{
@@ -6828,6 +6825,7 @@
68286825
},
68296826
{
68306827
"cell_type": "markdown",
6828+
"id": "9a63283cbaf04dbcab1f6479b197f3a8",
68316829
"metadata": {},
68326830
"source": []
68336831
}

0 commit comments

Comments
 (0)