Skip to content

Commit eabbc99

Browse files
authored
Merge pull request #372 from bashtage/doc-fixes
DOC: Fix docs
2 parents 983fd88 + 122a473 commit eabbc99

File tree

12 files changed

+26
-38
lines changed

12 files changed

+26
-38
lines changed

doc/requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
numba>=0.49
22
nbsphinx
33
sphinx-immaterial
4-
sphinx>=5
5-
ipython>=6
6-
pygments>=2.7.4 # not directly required, pinned by Snyk to avoid a vulnerability
4+
sphinx>=8
5+
ipython>=8
6+
pickleshare
7+
pygments>=2.7.4 # not directly required, pinned by Snyk to avoid a vulnerability

doc/source/change-log.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,12 +140,12 @@ v1.18.0
140140
- ``choice`` pulled in upstream performance improvement that
141141
use a hash set when choosing without replacement and without user-provided probabilities.
142142
- Added support for :class:`~randomgen.seed_sequence.SeedSequence` (and NumPy's ``SeedSequence``).
143-
- Fixed a bug that affected both :class:`~randomgen.generator.Generator.randint`
143+
- Fixed a bug that affected both ``randomgen.generator.Generator.randint``
144144
in ``Generator`` and ``randint``
145145
in ``RandomState`` when ``high=2**32``. This value is inbounds for
146146
a 32-bit unsigned closed interval generator, and so should have been redirected to
147147
a 32-bit generator. It was erroneously sent to the 64-bit path. The random values produced
148-
are fully random but inefficient. This fix breaks the stream in :class:`~randomgen.generator.Generator
148+
are fully random but inefficient. This fix breaks the stream in ``randomgen.generator.Generator``
149149
is the value for ``high`` is used. The fix restores ``RandomState`` to
150150
NumPy 1.16 compatibility.
151151
only affects the output if ``dtype`` is ``'int64'``

doc/source/conf.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -234,14 +234,12 @@
234234

235235
# Example configuration for intersphinx: refer to the Python standard library.
236236
intersphinx_mapping = {
237-
"statsmodels": ("https://www.statsmodels.org/dev/", None),
238-
"matplotlib": ("https://matplotlib.org/stable/", None),
239-
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
240-
"python": ("https://docs.python.org/3/", None),
241-
"numpy": ("https://numpy.org/doc/stable/", None),
242-
"np": ("https://numpy.org/doc/stable/", None),
243-
"pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None),
244-
"pd": ("https://pandas.pydata.org/pandas-docs/stable/", None),
237+
"statsmodels": ("https://www.statsmodels.org/dev", None),
238+
"matplotlib": ("https://matplotlib.org/stable", None),
239+
"scipy": ("https://docs.scipy.org/doc/scipy", None),
240+
"python": ("https://docs.python.org/3", None),
241+
"numpy": ("https://numpy.org/doc/stable", None),
242+
"pandas": ("https://pandas.pydata.org/pandas-docs/stable", None),
245243
}
246244

247245

doc/source/generator.rst

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ Random Generator
99

1010
.. danger::
1111

12-
``Generator`` has been **removed**. You should be using :class:`numpy.random.Generator`.
12+
``Generator`` has been completely **removed** in randomgen 2.0.0.
13+
You should be using :class:`numpy.random.Generator`.
1314

14-
.. currentmodule:: randomgen.generator
15-
16-
.. autoclass::
17-
Generator

doc/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Seed information is directly passed to the bit generator.
2929

3030
.. code-block:: python
3131
32-
rg = Generator(AESCounter(12345, mode="sequence"))
32+
rg = Generator(AESCounter(12345))
3333
rg.random()
3434
3535
History

doc/source/legacy.rst

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ Legacy Random Generation
1010

1111
.. danger::
1212

13-
``RandomState`` has been **removed**. You should be using :class:`numpy.random.Generator`,
14-
or if you must have backward compatibility with NumPy before 1.17, :class:`numpy.random.RandomState`.
15-
16-
.. currentmodule:: randomgen.mtrand
17-
18-
.. autoclass::
19-
RandomState
13+
``RandomState`` has been completely **removed** in randomgen 2.0.0.
14+
You should be using :class:`numpy.random.Generator`, or if you must
15+
have full stability (e.g., for writing tests) or backward compatibility
16+
with NumPy before 1.17, :class:`numpy.random.RandomState`.

randomgen/bounded_integers.pyx.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ cdef object _rand_{{nptype}}(object low, object high, object size,
249249
250250
Returns
251251
-------
252-
out : python scalar or ndarray of np.{{nptype}}
252+
out : int or ndarray of np.{{nptype}}
253253
`size`-shaped array of random integers from the appropriate
254254
distribution, or a single such random int if `size` not provided.
255255

randomgen/dsfmt.pyx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,6 @@ cdef class DSFMT(BitGenerator):
4141
``None`` (the default). If `seed` is ``None``, then 764 32-bit unsigned
4242
integers are read from ``/dev/urandom`` (or the Windows analog) if
4343
available. If unavailable, a hash of the time and process ID is used.
44-
mode : {None, "sequence"}, optional
45-
The seeding mode to use. "sequence" uses a SeedSequence
46-
to transforms the seed into an initial state.
4744
4845
Attributes
4946
----------

randomgen/entropy.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def random_entropy(size=None, source="system"):
117117
118118
Returns
119119
-------
120-
entropy : scalar or ndarray
120+
entropy : int or ndarray
121121
Entropy bits in 32-bit unsigned integers. A scalar is returned if size
122122
is `None`.
123123

randomgen/generator.pyx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ cdef class ExtendedGenerator:
194194
195195
Returns
196196
-------
197-
bit_generator : BitGenerator
197+
bit_generator : numpy.random.BitGenerator
198198
The bit generator instance used by the generator
199199
"""
200200
return self._bit_generator
@@ -239,7 +239,7 @@ cdef class ExtendedGenerator:
239239
240240
Returns
241241
-------
242-
out : uint or ndarray
242+
out : integer or ndarray
243243
Drawn samples.
244244
245245
Notes
@@ -561,7 +561,7 @@ cdef class ExtendedGenerator:
561561
562562
Returns
563563
-------
564-
out : ndarray or scalar
564+
out : complex or ndarray
565565
Drawn samples from the parameterized complex normal distribution.
566566
567567
See Also

0 commit comments

Comments
 (0)