Skip to content

Commit

Permalink
Merge pull request numpy#21856 from bramton/main
Browse files Browse the repository at this point in the history
DOC: Mention uniform in the np.random.Generator.random function.
  • Loading branch information
charris authored Jul 10, 2022
2 parents 8b8ca09 + 5111b1e commit c1fce11
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions numpy/random/_generator.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -242,10 +242,10 @@ cdef class Generator:
Return random floats in the half-open interval [0.0, 1.0).
Results are from the "continuous uniform" distribution over the
stated interval. To sample :math:`Unif[a, b), b > a` multiply
the output of `random` by `(b-a)` and add `a`::
stated interval. To sample :math:`Unif[a, b), b > a` use `uniform`
or multiply the output of `random` by ``(b - a)`` and add ``a``::
(b - a) * random() + a
(b - a) * random() + a
Parameters
----------
Expand All @@ -267,6 +267,10 @@ cdef class Generator:
Array of random floats of shape `size` (unless ``size=None``, in which
case a single float is returned).
See Also
--------
uniform : Draw samples from the parameterized uniform distribution.
Examples
--------
>>> rng = np.random.default_rng()
Expand Down

0 comments on commit c1fce11

Please sign in to comment.