Skip to content

Commit 778ded4

Browse files
committed
Add table of contents
1 parent 4ecad17 commit 778ded4

21 files changed

+966
-400
lines changed

codes/01-array-basics.ipynb

Lines changed: 40 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,35 @@
1313
"cell_type": "markdown",
1414
"metadata": {},
1515
"source": [
16-
"# Dependencies\n"
16+
"**Table of contents**<a id='toc0_'></a> \n",
17+
"- [Dependencies](#toc1_) \n",
18+
"- [NumPy Basics](#toc2_) \n",
19+
" - [0D Array (Known as Scalar)](#toc2_1_) \n",
20+
" - [1D Array (Known as Vector)](#toc2_2_) \n",
21+
" - [2D Array (known as Matrix)](#toc2_3_) \n",
22+
" - [3D Array](#toc2_4_) \n",
23+
" - [4D Array](#toc2_5_) \n",
24+
"\n",
25+
"<!-- vscode-jupyter-toc-config\n",
26+
"\tnumbering=false\n",
27+
"\tanchor=true\n",
28+
"\tflat=false\n",
29+
"\tminLevel=1\n",
30+
"\tmaxLevel=6\n",
31+
"\t/vscode-jupyter-toc-config -->\n",
32+
"<!-- THIS CELL WILL BE REPLACED ON TOC UPDATE. DO NOT WRITE YOUR TEXT IN THIS CELL -->"
33+
]
34+
},
35+
{
36+
"cell_type": "markdown",
37+
"metadata": {},
38+
"source": [
39+
"# <a id='toc1_'></a>[Dependencies](#toc0_)\n"
1740
]
1841
},
1942
{
2043
"cell_type": "code",
21-
"execution_count": 1,
44+
"execution_count": null,
2245
"metadata": {},
2346
"outputs": [],
2447
"source": [
@@ -29,7 +52,7 @@
2952
"cell_type": "markdown",
3053
"metadata": {},
3154
"source": [
32-
"# NumPy Basics\n",
55+
"# <a id='toc2_'></a>[NumPy Basics](#toc0_)\n",
3356
"\n",
3457
"- **NumPy** is a powerful library for numerical computing in Python, optimized for high-performance array operations.\n",
3558
"- **Arrays** in NumPy provide efficient storage and are the primary data structure, supporting fast mathematical computations over large datasets.\n",
@@ -46,12 +69,12 @@
4669
"cell_type": "markdown",
4770
"metadata": {},
4871
"source": [
49-
"## 0D array (Known as scalar)\n"
72+
"## <a id='toc2_1_'></a>[0D Array (Known as Scalar)](#toc0_)\n"
5073
]
5174
},
5275
{
5376
"cell_type": "code",
54-
"execution_count": 2,
77+
"execution_count": null,
5578
"metadata": {},
5679
"outputs": [
5780
{
@@ -79,7 +102,7 @@
79102
},
80103
{
81104
"cell_type": "code",
82-
"execution_count": 3,
105+
"execution_count": null,
83106
"metadata": {},
84107
"outputs": [
85108
{
@@ -109,12 +132,12 @@
109132
"cell_type": "markdown",
110133
"metadata": {},
111134
"source": [
112-
"## 1D array (Known as vector)\n"
135+
"## <a id='toc2_2_'></a>[1D Array (Known as Vector)](#toc0_)\n"
113136
]
114137
},
115138
{
116139
"cell_type": "code",
117-
"execution_count": 4,
140+
"execution_count": null,
118141
"metadata": {},
119142
"outputs": [
120143
{
@@ -142,7 +165,7 @@
142165
},
143166
{
144167
"cell_type": "code",
145-
"execution_count": 5,
168+
"execution_count": null,
146169
"metadata": {},
147170
"outputs": [
148171
{
@@ -173,12 +196,12 @@
173196
"cell_type": "markdown",
174197
"metadata": {},
175198
"source": [
176-
"## 2D array (known as matrix)\n"
199+
"## <a id='toc2_3_'></a>[2D Array (known as Matrix)](#toc0_)\n"
177200
]
178201
},
179202
{
180203
"cell_type": "code",
181-
"execution_count": 6,
204+
"execution_count": null,
182205
"metadata": {},
183206
"outputs": [
184207
{
@@ -210,7 +233,7 @@
210233
},
211234
{
212235
"cell_type": "code",
213-
"execution_count": 7,
236+
"execution_count": null,
214237
"metadata": {},
215238
"outputs": [
216239
{
@@ -245,12 +268,12 @@
245268
"cell_type": "markdown",
246269
"metadata": {},
247270
"source": [
248-
"## 3D array\n"
271+
"## <a id='toc2_4_'></a>[3D Array](#toc0_)\n"
249272
]
250273
},
251274
{
252275
"cell_type": "code",
253-
"execution_count": 8,
276+
"execution_count": null,
254277
"metadata": {},
255278
"outputs": [
256279
{
@@ -284,7 +307,7 @@
284307
},
285308
{
286309
"cell_type": "code",
287-
"execution_count": 9,
310+
"execution_count": null,
288311
"metadata": {},
289312
"outputs": [
290313
{
@@ -337,12 +360,12 @@
337360
"cell_type": "markdown",
338361
"metadata": {},
339362
"source": [
340-
"## 4D array\n"
363+
"## <a id='toc2_5_'></a>[4D Array](#toc0_)\n"
341364
]
342365
},
343366
{
344367
"cell_type": "code",
345-
"execution_count": 10,
368+
"execution_count": null,
346369
"metadata": {},
347370
"outputs": [
348371
{

codes/02-arithmetic-operations.ipynb

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,33 @@
1313
"cell_type": "markdown",
1414
"metadata": {},
1515
"source": [
16-
"# Dependencies\n"
16+
"**Table of contents**<a id='toc0_'></a> \n",
17+
"- [Dependencies](#toc1_) \n",
18+
"- [NumPy - Arithmetic Operations](#toc2_) \n",
19+
" - [Array & Scalar](#toc2_1_) \n",
20+
" - [Array & Array](#toc2_2_) \n",
21+
" - [Broadcasting](#toc2_3_) \n",
22+
"\n",
23+
"<!-- vscode-jupyter-toc-config\n",
24+
"\tnumbering=false\n",
25+
"\tanchor=true\n",
26+
"\tflat=false\n",
27+
"\tminLevel=1\n",
28+
"\tmaxLevel=6\n",
29+
"\t/vscode-jupyter-toc-config -->\n",
30+
"<!-- THIS CELL WILL BE REPLACED ON TOC UPDATE. DO NOT WRITE YOUR TEXT IN THIS CELL -->"
31+
]
32+
},
33+
{
34+
"cell_type": "markdown",
35+
"metadata": {},
36+
"source": [
37+
"# <a id='toc1_'></a>[Dependencies](#toc0_)\n"
1738
]
1839
},
1940
{
2041
"cell_type": "code",
21-
"execution_count": 1,
42+
"execution_count": null,
2243
"metadata": {},
2344
"outputs": [],
2445
"source": [
@@ -29,7 +50,7 @@
2950
"cell_type": "markdown",
3051
"metadata": {},
3152
"source": [
32-
"# NumPy - Arithmetic Operations\n",
53+
"# <a id='toc2_'></a>[NumPy - Arithmetic Operations](#toc0_)\n",
3354
"\n",
3455
"- **Scalar and Array Operations**:\n",
3556
" - Demonstrates adding, subtracting, multiplying, dividing, and performing other arithmetic operations between a NumPy array and a scalar.\n",
@@ -48,12 +69,12 @@
4869
"cell_type": "markdown",
4970
"metadata": {},
5071
"source": [
51-
"## Array & Scalar\n"
72+
"## <a id='toc2_1_'></a>[Array & Scalar](#toc0_)\n"
5273
]
5374
},
5475
{
5576
"cell_type": "code",
56-
"execution_count": 2,
77+
"execution_count": null,
5778
"metadata": {},
5879
"outputs": [
5980
{
@@ -88,7 +109,7 @@
88109
},
89110
{
90111
"cell_type": "code",
91-
"execution_count": 3,
112+
"execution_count": null,
92113
"metadata": {},
93114
"outputs": [
94115
{
@@ -146,12 +167,12 @@
146167
"cell_type": "markdown",
147168
"metadata": {},
148169
"source": [
149-
"## Array & Array\n"
170+
"## <a id='toc2_2_'></a>[Array & Array](#toc0_)\n"
150171
]
151172
},
152173
{
153174
"cell_type": "code",
154-
"execution_count": 4,
175+
"execution_count": null,
155176
"metadata": {},
156177
"outputs": [
157178
{
@@ -187,7 +208,7 @@
187208
},
188209
{
189210
"cell_type": "code",
190-
"execution_count": 5,
211+
"execution_count": null,
191212
"metadata": {},
192213
"outputs": [
193214
{
@@ -246,15 +267,15 @@
246267
"cell_type": "markdown",
247268
"metadata": {},
248269
"source": [
249-
"## Broadcasting\n",
270+
"## <a id='toc2_3_'></a>[Broadcasting](#toc0_)\n",
250271
"\n",
251272
"- It allows arrays of different shapes to be used together in different operations.\n",
252273
"- The **smaller** array is “broadcasted” across the **larger** array so that they have compatible shapes.\n"
253274
]
254275
},
255276
{
256277
"cell_type": "code",
257-
"execution_count": 6,
278+
"execution_count": null,
258279
"metadata": {},
259280
"outputs": [
260281
{

codes/03-comparative-operations.ipynb

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,33 @@
1313
"cell_type": "markdown",
1414
"metadata": {},
1515
"source": [
16-
"# Dependencies\n"
16+
"**Table of contents**<a id='toc0_'></a> \n",
17+
"- [Dependencies](#toc1_) \n",
18+
"- [NumPy - Comparative Operations](#toc2_) \n",
19+
" - [Array & Scalar](#toc2_1_) \n",
20+
" - [Array & Array](#toc2_2_) \n",
21+
" - [Broadcasting](#toc2_3_) \n",
22+
"\n",
23+
"<!-- vscode-jupyter-toc-config\n",
24+
"\tnumbering=false\n",
25+
"\tanchor=true\n",
26+
"\tflat=false\n",
27+
"\tminLevel=1\n",
28+
"\tmaxLevel=6\n",
29+
"\t/vscode-jupyter-toc-config -->\n",
30+
"<!-- THIS CELL WILL BE REPLACED ON TOC UPDATE. DO NOT WRITE YOUR TEXT IN THIS CELL -->"
31+
]
32+
},
33+
{
34+
"cell_type": "markdown",
35+
"metadata": {},
36+
"source": [
37+
"# <a id='toc1_'></a>[Dependencies](#toc0_)\n"
1738
]
1839
},
1940
{
2041
"cell_type": "code",
21-
"execution_count": 1,
42+
"execution_count": null,
2243
"metadata": {},
2344
"outputs": [],
2445
"source": [
@@ -29,7 +50,7 @@
2950
"cell_type": "markdown",
3051
"metadata": {},
3152
"source": [
32-
"# NumPy - Comparative Operations\n",
53+
"# <a id='toc2_'></a>[NumPy - Comparative Operations](#toc0_)\n",
3354
"\n",
3455
"- **Scalar and Array Operations**:\n",
3556
" - Compares arrays with scalar values using operators like `==`, `!=`, `<`, `>`, `<=`, and `>=`..\n",
@@ -48,7 +69,7 @@
4869
"cell_type": "markdown",
4970
"metadata": {},
5071
"source": [
51-
"## Array & Scalar\n"
72+
"## <a id='toc2_1_'></a>[Array & Scalar](#toc0_)\n"
5273
]
5374
},
5475
{
@@ -86,7 +107,7 @@
86107
},
87108
{
88109
"cell_type": "code",
89-
"execution_count": 3,
110+
"execution_count": null,
90111
"metadata": {},
91112
"outputs": [
92113
{
@@ -139,7 +160,7 @@
139160
"cell_type": "markdown",
140161
"metadata": {},
141162
"source": [
142-
"## Array & Array\n"
163+
"## <a id='toc2_2_'></a>[Array & Array](#toc0_)\n"
143164
]
144165
},
145166
{
@@ -178,7 +199,7 @@
178199
},
179200
{
180201
"cell_type": "code",
181-
"execution_count": 5,
202+
"execution_count": null,
182203
"metadata": {},
183204
"outputs": [
184205
{
@@ -232,7 +253,7 @@
232253
"cell_type": "markdown",
233254
"metadata": {},
234255
"source": [
235-
"## Broadcasting\n",
256+
"## <a id='toc2_3_'></a>[Broadcasting](#toc0_)\n",
236257
"\n",
237258
"- It allows arrays of different shapes to be used together in different operations.\n",
238259
"- The **smaller** array is “broadcasted” across the **larger** array so that they have compatible shapes.\n"

0 commit comments

Comments
 (0)