diff options
author | Bram <bram@cbbg.nl> | 2022-06-27 12:48:41 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-27 12:48:41 +0200 |
commit | 1ceb96bd45b9b24518de3eb314e217c942eb403c (patch) | |
tree | e831018ef16f5c515d4cd99eb5dd8c20f8ba9656 /numpy | |
parent | f3935c9dc9a661bf818a09e46da6497220bd7dca (diff) | |
download | numpy-1ceb96bd45b9b24518de3eb314e217c942eb403c.tar.gz |
DOC: Mention uniform in the np.random.Generator.random function.
Added a See also section to mention np.random.Generator.uniform.
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/random/_generator.pyx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx index 8092c8e7a..6c8e40813 100644 --- a/numpy/random/_generator.pyx +++ b/numpy/random/_generator.pyx @@ -242,7 +242,7 @@ 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 + 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 @@ -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 : Drawn samples from the parameterized uniform distribution. + Examples -------- >>> rng = np.random.default_rng() |