From 57016461fd2b13d086c6278dde12800887cb88fe Mon Sep 17 00:00:00 2001 From: Chihiro Watanabe Date: Mon, 18 May 2026 15:03:09 +0900 Subject: [PATCH] Update rng usage in lln_clt.md Co-Authored-By: Claude Sonnet 4.6 --- lectures/lln_clt.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lectures/lln_clt.md b/lectures/lln_clt.md index 476a55482..9ee46a6d6 100644 --- a/lectures/lln_clt.md +++ b/lectures/lln_clt.md @@ -562,7 +562,8 @@ NumPy doesn't provide a `bernoulli` function that we can sample from. However, we can generate a draw of Bernoulli $X$ using NumPy via ```python3 -U = np.random.rand() +rng = np.random.default_rng() +U = rng.random() X = 1 if U < p else 0 print(X) ```