Skip to content

Commit a83d469

Browse files
authored
Merge pull request numpy#26378 from bmwoodruff/links-generator-rst
DOC: Update internal links for generator.rst and related
2 parents 53cfea9 + 4b23d55 commit a83d469

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

doc/source/reference/random/generator.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Random ``Generator``
44
====================
5-
The `~Generator` provides access to
5+
The `Generator` provides access to
66
a wide range of distributions, and served as a replacement for
77
:class:`~numpy.random.RandomState`. The main difference between
8-
the two is that ``Generator`` relies on an additional BitGenerator to
8+
the two is that `Generator` relies on an additional BitGenerator to
99
manage state and generate the random bits, which are then transformed into
1010
random values from useful distributions. The default BitGenerator used by
11-
``Generator`` is `~PCG64`. The BitGenerator
12-
can be changed by passing an instantized BitGenerator to ``Generator``.
11+
`Generator` is `PCG64`. The BitGenerator
12+
can be changed by passing an instantized BitGenerator to `Generator`.
1313

1414

1515
.. autofunction:: default_rng

numpy/random/_generator.pyx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ cdef class Generator:
146146
147147
Container for the BitGenerators.
148148
149-
``Generator`` exposes a number of methods for generating random
149+
`Generator` exposes a number of methods for generating random
150150
numbers drawn from a variety of probability distributions. In addition to
151151
the distribution-specific arguments, each method takes a keyword argument
152152
`size` that defaults to ``None``. If `size` is ``None``, then a single
@@ -159,7 +159,7 @@ cdef class Generator:
159159
160160
**No Compatibility Guarantee**
161161
162-
``Generator`` does not provide a version compatibility guarantee. In
162+
`Generator` does not provide a version compatibility guarantee. In
163163
particular, as better algorithms evolve the bit stream may change.
164164
165165
Parameters
@@ -171,8 +171,8 @@ cdef class Generator:
171171
-----
172172
The Python stdlib module `random` contains pseudo-random number generator
173173
with a number of methods that are similar to the ones available in
174-
``Generator``. It uses Mersenne Twister, and this bit generator can
175-
be accessed using ``MT19937``. ``Generator``, besides being
174+
`Generator`. It uses Mersenne Twister, and this bit generator can
175+
be accessed using `MT19937`. `Generator`, besides being
176176
NumPy-aware, has the advantage that it provides a much larger number
177177
of probability distributions to choose from.
178178
@@ -5025,11 +5025,11 @@ def default_rng(seed=None):
50255025
50265026
Examples
50275027
--------
5028-
``default_rng`` is the recommended constructor for the random number class
5029-
``Generator``. Here are several ways we can construct a random
5030-
number generator using ``default_rng`` and the ``Generator`` class.
5028+
`default_rng` is the recommended constructor for the random number class
5029+
`Generator`. Here are several ways we can construct a random
5030+
number generator using `default_rng` and the `Generator` class.
50315031
5032-
Here we use ``default_rng`` to generate a random float:
5032+
Here we use `default_rng` to generate a random float:
50335033
50345034
>>> import numpy as np
50355035
>>> rng = np.random.default_rng(12345)
@@ -5041,7 +5041,7 @@ def default_rng(seed=None):
50415041
>>> type(rfloat)
50425042
<class 'float'>
50435043
5044-
Here we use ``default_rng`` to generate 3 random integers between 0
5044+
Here we use `default_rng` to generate 3 random integers between 0
50455045
(inclusive) and 10 (exclusive):
50465046
50475047
>>> import numpy as np

0 commit comments

Comments
 (0)