Skip to content

Commit 423783e

Browse files
committed
Install a fixed release in the notebook example
1 parent 954532d commit 423783e

2 files changed

Lines changed: 27 additions & 23 deletions

File tree

‎docs/user/tutorials/notebook-quickstart.md‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ one session.
2020
</p>
2121

2222
The notebook runs top to bottom and builds real extension modules, so it needs a
23-
compiler. In Colab the first cell installs one.
23+
compiler. In Colab the first cell installs one, along with PRIK:
24+
25+
```bash
26+
pip install "prik[jupyter]"
27+
```
2428

2529
## 1. Load the extension
2630

‎examples/notebooks/quickstart.ipynb‎

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "f69700b9",
5+
"id": "7acf44e9",
66
"metadata": {},
77
"source": [
88
"# PRIK quickstart\n",
@@ -15,7 +15,7 @@
1515
},
1616
{
1717
"cell_type": "markdown",
18-
"id": "ea638956",
18+
"id": "cdfc4fb9",
1919
"metadata": {},
2020
"source": [
2121
"## Setup\n",
@@ -26,7 +26,7 @@
2626
{
2727
"cell_type": "code",
2828
"execution_count": null,
29-
"id": "a446408a",
29+
"id": "6eb48cdd",
3030
"metadata": {
3131
"tags": [
3232
"prik-colab-setup"
@@ -35,12 +35,12 @@
3535
"outputs": [],
3636
"source": [
3737
"!apt-get -qq install -y gfortran > /dev/null\n",
38-
"!pip install -q \"prik[jupyter] @ git+https://github.com/PyNumLab/prik.git\""
38+
"!pip install -q \"prik[jupyter]>=0.4.3\""
3939
]
4040
},
4141
{
4242
"cell_type": "markdown",
43-
"id": "cf97f2e1",
43+
"id": "efbc270e",
4444
"metadata": {},
4545
"source": [
4646
"If pip upgraded NumPy, Colab will ask you to restart the runtime. Do that,\n",
@@ -50,7 +50,7 @@
5050
{
5151
"cell_type": "code",
5252
"execution_count": null,
53-
"id": "a68d174c",
53+
"id": "c4841aec",
5454
"metadata": {},
5555
"outputs": [],
5656
"source": [
@@ -60,7 +60,7 @@
6060
{
6161
"cell_type": "code",
6262
"execution_count": null,
63-
"id": "d9b016ec",
63+
"id": "2414c834",
6464
"metadata": {},
6565
"outputs": [],
6666
"source": [
@@ -69,7 +69,7 @@
6969
},
7070
{
7171
"cell_type": "markdown",
72-
"id": "b82f42f2",
72+
"id": "51493a14",
7373
"metadata": {},
7474
"source": [
7575
"## 1. Compile a Fortran cell\n",
@@ -81,7 +81,7 @@
8181
{
8282
"cell_type": "code",
8383
"execution_count": null,
84-
"id": "205cf93b",
84+
"id": "83c0c9ba",
8585
"metadata": {},
8686
"outputs": [],
8787
"source": [
@@ -98,7 +98,7 @@
9898
{
9999
"cell_type": "code",
100100
"execution_count": null,
101-
"id": "995ac839",
101+
"id": "48a277e9",
102102
"metadata": {},
103103
"outputs": [],
104104
"source": [
@@ -109,7 +109,7 @@
109109
},
110110
{
111111
"cell_type": "markdown",
112-
"id": "134d3908",
112+
"id": "bd5b9c3b",
113113
"metadata": {},
114114
"source": [
115115
"## 2. Compile a C cell\n",
@@ -121,7 +121,7 @@
121121
{
122122
"cell_type": "code",
123123
"execution_count": null,
124-
"id": "b77b1866",
124+
"id": "f8850dbf",
125125
"metadata": {},
126126
"outputs": [],
127127
"source": [
@@ -137,7 +137,7 @@
137137
},
138138
{
139139
"cell_type": "markdown",
140-
"id": "7e60efc9",
140+
"id": "7eb51280",
141141
"metadata": {},
142142
"source": [
143143
"PRIK gave `double *values` a *runtime-rank* contract, so it accepts a NumPy\n",
@@ -148,7 +148,7 @@
148148
{
149149
"cell_type": "code",
150150
"execution_count": null,
151-
"id": "ddd15779",
151+
"id": "f509b6c6",
152152
"metadata": {},
153153
"outputs": [],
154154
"source": [
@@ -160,7 +160,7 @@
160160
},
161161
{
162162
"cell_type": "markdown",
163-
"id": "6c639d2a",
163+
"id": "305575f1",
164164
"metadata": {},
165165
"source": [
166166
"## 3. Reshape the API with a contract\n",
@@ -175,7 +175,7 @@
175175
{
176176
"cell_type": "code",
177177
"execution_count": null,
178-
"id": "cdb09a85",
178+
"id": "60eeb7d3",
179179
"metadata": {},
180180
"outputs": [],
181181
"source": [
@@ -191,7 +191,7 @@
191191
},
192192
{
193193
"cell_type": "markdown",
194-
"id": "818a7cfe",
194+
"id": "8f3defb0",
195195
"metadata": {},
196196
"source": [
197197
"The generated contract reads `def scale(count: UInt64, values: Float64[...])`.\n",
@@ -202,7 +202,7 @@
202202
{
203203
"cell_type": "code",
204204
"execution_count": null,
205-
"id": "3955cb30",
205+
"id": "c2c96fb9",
206206
"metadata": {},
207207
"outputs": [],
208208
"source": [
@@ -218,7 +218,7 @@
218218
},
219219
{
220220
"cell_type": "markdown",
221-
"id": "fbc473b2",
221+
"id": "e75ef594",
222222
"metadata": {},
223223
"source": [
224224
"Same C code, same compiler. Only the Python API changed — `count` is gone:"
@@ -227,7 +227,7 @@
227227
{
228228
"cell_type": "code",
229229
"execution_count": null,
230-
"id": "1fd12b49",
230+
"id": "2bd5adf9",
231231
"metadata": {},
232232
"outputs": [],
233233
"source": [
@@ -240,7 +240,7 @@
240240
{
241241
"cell_type": "code",
242242
"execution_count": null,
243-
"id": "57814aab",
243+
"id": "45e87a44",
244244
"metadata": {},
245245
"outputs": [],
246246
"source": [
@@ -251,7 +251,7 @@
251251
},
252252
{
253253
"cell_type": "markdown",
254-
"id": "25f4b06f",
254+
"id": "2a39221a",
255255
"metadata": {},
256256
"source": [
257257
"## Where to go next\n",

0 commit comments

Comments
 (0)