From 189c948b161d333bc80205ba6f134139f482b5b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ken=20Marc=20R=C3=B6lli?= <79468446+ken-r@users.noreply.github.com> Date: Fri, 15 Aug 2025 08:44:37 +0200 Subject: [PATCH 1/2] Fix scipy exercise hints Two exercise hints in the scipy lecture are not fully accurate. --- lectures/scipy.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lectures/scipy.md b/lectures/scipy.md index 5b916f39..0f72a163 100644 --- a/lectures/scipy.md +++ b/lectures/scipy.md @@ -476,7 +476,7 @@ over the interval $[0, 400]$ when `μ, σ, β, n, K = 4, 0.25, 0.99, 10, 40`. ```{hint} :class: dropdown -From `scipy.stats` you can import `lognorm` and then use `lognorm(x, σ, scale=np.exp(μ)` to get the density $f$. +From `scipy.stats` you can import `lognorm` and then use `lognorm.pdf(x, σ, scale=np.exp(μ)` to get the density $f$. ``` ```{exercise-end} @@ -512,7 +512,7 @@ plt.show() ```{exercise} :label: sp_ex02 -In order to get the option price, compute the integral of this function numerically using `quad` from `scipy.optimize`. +In order to get the option price, compute the integral of this function numerically using `quad` from `scipy.integrate`. ``` From 664e33f59a0e9bdbd669756f1b4a6539e22bf03a Mon Sep 17 00:00:00 2001 From: Matt McKay Date: Fri, 15 Aug 2025 17:25:51 +1000 Subject: [PATCH 2/2] Update lectures/scipy.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- lectures/scipy.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lectures/scipy.md b/lectures/scipy.md index 0f72a163..1fdf834e 100644 --- a/lectures/scipy.md +++ b/lectures/scipy.md @@ -476,7 +476,7 @@ over the interval $[0, 400]$ when `μ, σ, β, n, K = 4, 0.25, 0.99, 10, 40`. ```{hint} :class: dropdown -From `scipy.stats` you can import `lognorm` and then use `lognorm.pdf(x, σ, scale=np.exp(μ)` to get the density $f$. +From `scipy.stats` you can import `lognorm` and then use `lognorm.pdf(x, σ, scale=np.exp(μ))` to get the density $f$. ``` ```{exercise-end}