Skip to content
This repository was archived by the owner on Aug 6, 2025. It is now read-only.

Commit f8b7f31

Browse files
authored
simple bug fix (#25)
* fix bugs for book6 * fix typo in chapter 5 * matrix operator fix wrong matrix operator in chapter 5 * matrix operator fix
1 parent 4eeb52d commit f8b7f31

2 files changed

Lines changed: 14 additions & 27 deletions

File tree

book/05/Theory/01.ipynb

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
},
3535
{
3636
"cell_type": "code",
37-
"execution_count": 2,
37+
"execution_count": 1,
3838
"metadata": {
3939
"collapsed": true,
4040
"nbgrader": {
@@ -901,7 +901,7 @@
901901
"source": [
902902
"Now let's multiply `my_mat2` x `my_mat1`.\n",
903903
"\n",
904-
"Let's also multiply `my_mat` x `my_mat2` (changed order)"
904+
"Let's also multiply `my_mat1` x `my_mat2` (changed order)"
905905
]
906906
},
907907
{
@@ -1145,7 +1145,7 @@
11451145
},
11461146
{
11471147
"cell_type": "code",
1148-
"execution_count": 37,
1148+
"execution_count": 2,
11491149
"metadata": {
11501150
"collapsed": true
11511151
},
@@ -1166,21 +1166,21 @@
11661166
},
11671167
{
11681168
"cell_type": "code",
1169-
"execution_count": 38,
1169+
"execution_count": 3,
11701170
"metadata": {},
11711171
"outputs": [
11721172
{
11731173
"name": "stdout",
11741174
"output_type": "stream",
11751175
"text": [
1176-
"[[ 0.8 -0.6]\n",
1177-
" [-0.8 12. ]]\n"
1176+
"[[-0.2 8.2]\n",
1177+
" [-0.2 14.2]]\n"
11781178
]
11791179
}
11801180
],
11811181
"source": [
11821182
"Mat_C_inv = np.linalg.inv(Mat_C)\n",
1183-
"Mat_D = (Mat_A*Mat_B)*Mat_C_inv\n",
1183+
"Mat_D = (Mat_A @ Mat_B) @ Mat_C_inv\n",
11841184
"print(Mat_D)"
11851185
]
11861186
},
@@ -2243,7 +2243,7 @@
22432243
"metadata": {
22442244
"hide_input": false,
22452245
"kernelspec": {
2246-
"display_name": "base",
2246+
"display_name": "mude",
22472247
"language": "python",
22482248
"name": "python3"
22492249
},
@@ -2257,7 +2257,7 @@
22572257
"name": "python",
22582258
"nbconvert_exporter": "python",
22592259
"pygments_lexer": "ipython3",
2260-
"version": "3.8.13"
2260+
"version": "3.11.9"
22612261
},
22622262
"latex_envs": {
22632263
"LaTeX_envs_menu_present": true,
@@ -2305,11 +2305,6 @@
23052305
"_Feature"
23062306
],
23072307
"window_display": false
2308-
},
2309-
"vscode": {
2310-
"interpreter": {
2311-
"hash": "ad2bdc8ecc057115af97d19610ffacc2b4e99fae6737bb82f5d7fb13d2f2c186"
2312-
}
23132308
}
23142309
},
23152310
"nbformat": 4,

book/06/Exercises/01.ipynb

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@
142142
"import numpy as np\n",
143143
"import pandas as pd\n",
144144
"\n",
145-
"file_location = (\"https://raw.githubusercontent.com/TUDelft-CITG/\"\n",
146-
" \"learn-python/mike/book/06/Theory/\")\n",
145+
"file_location = (\"https://raw.githubusercontent.com/TeachBooks/learn-python/main/book/06/Theory/\")\n",
147146
"mineral_properties = pd.read_csv(file_location + 'mineral_properties.txt', \n",
148147
" skiprows=1,skipinitialspace=True)\n",
149148
"mineral_properties['new_column'] = np.nan\n",
@@ -285,8 +284,7 @@
285284
},
286285
"outputs": [],
287286
"source": [
288-
"file_location = (\"https://raw.githubusercontent.com/TUDelft-CITG/\"\n",
289-
" \"learn-python/mike/book/06/Exercises/\")\n",
287+
"file_location = (\"https://raw.githubusercontent.com/TeachBooks/learn-python/main/book/06/Exercises/\")\n",
290288
"\n",
291289
"mountains_8000 = ... #1 \n",
292290
"cols = ... #2 \n",
@@ -361,8 +359,7 @@
361359
},
362360
"outputs": [],
363361
"source": [
364-
"file_location = (\"https://raw.githubusercontent.com/TUDelft-CITG/\"\n",
365-
" \"learn-python/mike/book/06/Exercises/\")\n",
362+
"file_location = (\"https://raw.githubusercontent.com/TeachBooks/learn-python/main/book/06/Exercises/\")\n",
366363
"\n",
367364
"mountains_7000 = ... # 1\n",
368365
"df_concat = ... # 2\n",
@@ -476,7 +473,7 @@
476473
"provenance": []
477474
},
478475
"kernelspec": {
479-
"display_name": "Python 3 [3.7]",
476+
"display_name": "mude",
480477
"language": "python",
481478
"name": "python3"
482479
},
@@ -490,12 +487,7 @@
490487
"name": "python",
491488
"nbconvert_exporter": "python",
492489
"pygments_lexer": "ipython3",
493-
"version": "3.8.13"
494-
},
495-
"vscode": {
496-
"interpreter": {
497-
"hash": "1fe2f2b718b1108b9c4176932db8a0ead471245140baaa21ea96a4066683e6b2"
498-
}
490+
"version": "3.11.9"
499491
}
500492
},
501493
"nbformat": 4,

0 commit comments

Comments
 (0)