From 4a2ca5fa18629debf12e9b5373433436a870f97f Mon Sep 17 00:00:00 2001 From: Linus <95619282+linus-md@users.noreply.github.com> Date: Sat, 9 Dec 2023 16:50:44 +0100 Subject: [PATCH 1/2] Fix typo --- numpy/random/_generator.pyx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx index 5db45601c754..5a0c1eedf098 100644 --- a/numpy/random/_generator.pyx +++ b/numpy/random/_generator.pyx @@ -2498,7 +2498,7 @@ cdef class Generator: ----- The probability density for the Logistic distribution is - .. math:: P(x) = P(x) = \\frac{e^{-(x-\\mu)/s}}{s(1+e^{-(x-\\mu)/s})^2}, + .. math:: P(x) = \\frac{e^{-(x-\\mu)/s}}{s(1+e^{-(x-\\mu)/s})^2}, where :math:`\\mu` = location and :math:`s` = scale. @@ -2524,7 +2524,8 @@ cdef class Generator: Draw samples from the distribution: >>> loc, scale = 10, 1 - >>> s = np.random.default_rng().logistic(loc, scale, 10000) + >>> rng = np.random.default_rng(). + >>> s = rng.logistic(loc, scale, 10000) >>> import matplotlib.pyplot as plt >>> count, bins, ignored = plt.hist(s, bins=50) From af69792ee71a35a8f2bb19fd02e3a8b059bd559c Mon Sep 17 00:00:00 2001 From: Linus <95619282+linus-md@users.noreply.github.com> Date: Sat, 9 Dec 2023 17:10:39 +0100 Subject: [PATCH 2/2] Fix typo --- numpy/random/_generator.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx index 5a0c1eedf098..33be5489f76f 100644 --- a/numpy/random/_generator.pyx +++ b/numpy/random/_generator.pyx @@ -2524,7 +2524,7 @@ cdef class Generator: Draw samples from the distribution: >>> loc, scale = 10, 1 - >>> rng = np.random.default_rng(). + >>> rng = np.random.default_rng() >>> s = rng.logistic(loc, scale, 10000) >>> import matplotlib.pyplot as plt >>> count, bins, ignored = plt.hist(s, bins=50)