From 9dae3f84c231d1a833c80380c761585edd476f34 Mon Sep 17 00:00:00 2001 From: Niolon Date: Tue, 19 May 2026 14:41:17 +0100 Subject: [PATCH 1/3] update common tools --- common-tools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common-tools b/common-tools index 6e1f2e3..74e1d27 160000 --- a/common-tools +++ b/common-tools @@ -1 +1 @@ -Subproject commit 6e1f2e38b5d6e983a40d8aff7a0ed5b294ac3bde +Subproject commit 74e1d2703b33581350c5bb04253aaa038b7424ac From dc9c9cf90822ccd2538f8b3e7cfc5c098b97a734 Mon Sep 17 00:00:00 2001 From: Niolon Date: Tue, 19 May 2026 14:51:47 +0100 Subject: [PATCH 2/3] change matplotlib exercise solution to previously explained concept --- Course/02_numpy.ipynb | 10 ++++++++-- Filled_Course/03b_matplotlib_exercise.ipynb | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Course/02_numpy.ipynb b/Course/02_numpy.ipynb index cd166eb..94bb47f 100644 --- a/Course/02_numpy.ipynb +++ b/Course/02_numpy.ipynb @@ -882,7 +882,7 @@ "execution_count": null, "metadata": { "editable": true, - "remove_code": "non-comments", + "remove_code": "after:# Load non-number columns from file (1,2,3)", "slideshow": { "slide_type": "" }, @@ -890,6 +890,8 @@ }, "outputs": [], "source": [ + "data_path2 = '../Data/presentation/molecule1.xyz'\n", + "\n", "# Load non-number columns from file (1,2,3)\n" ] }, @@ -1000,7 +1002,7 @@ "execution_count": null, "metadata": { "editable": true, - "remove_code": "non-comments", + "remove_code": "after:# Output matrix multiplication vs elementwise multiplication", "slideshow": { "slide_type": "" }, @@ -1009,6 +1011,10 @@ "outputs": [], "source": [ "# We define two arrays: A - a 3x3 matrix and B - a 3x1 vector\n", + "mat_A = np.array([[1, 0, 3], [-1, 2, 1], [-2, -2, 1]])\n", + "print(mat_A)\n", + "vec_A = np.array([[1], [0], [-1]])\n", + "print(vec_A)\n", "\n", "# Output matrix multiplication vs elementwise multiplication\n" ] diff --git a/Filled_Course/03b_matplotlib_exercise.ipynb b/Filled_Course/03b_matplotlib_exercise.ipynb index f256f8d..e7c740d 100644 --- a/Filled_Course/03b_matplotlib_exercise.ipynb +++ b/Filled_Course/03b_matplotlib_exercise.ipynb @@ -185,7 +185,7 @@ "fig2, ax2 = plt.subplots(1, 1, figsize=(8, 1))\n", "\n", "# Create scatter plots for every regression line\n", - "for i, ax in enumerate(axs.flat):\n", + "for i, ax in enumerate(axs.reshape(4)):\n", " data = data_dict[f'dataset{i+1}']\n", " x = np.array(data['x'])\n", " y = np.array(data['y'])\n", From 37b3a533429665b3ea4a7b9c27f8249b9b5d03aa Mon Sep 17 00:00:00 2001 From: Niolon Date: Tue, 19 May 2026 14:52:22 +0100 Subject: [PATCH 3/3] Adapt the deleted line to not needlessly needing to input things --- Filled_Course/02_numpy.ipynb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Filled_Course/02_numpy.ipynb b/Filled_Course/02_numpy.ipynb index a40b7e5..ac54694 100644 --- a/Filled_Course/02_numpy.ipynb +++ b/Filled_Course/02_numpy.ipynb @@ -1004,7 +1004,7 @@ "execution_count": null, "metadata": { "editable": true, - "remove_code": "non-comments", + "remove_code": "after:# Load non-number columns from file (1,2,3)", "slideshow": { "slide_type": "" }, @@ -1148,7 +1148,7 @@ "execution_count": null, "metadata": { "editable": true, - "remove_code": "non-comments", + "remove_code": "after:# Output matrix multiplication vs elementwise multiplication", "slideshow": { "slide_type": "" },