Skip to content

Commit f98e9d5

Browse files
committed
remove uses of .. note:: in docs for now
1 parent 42f9b70 commit f98e9d5

File tree

2 files changed

+29
-36
lines changed

2 files changed

+29
-36
lines changed

mkl_random/interfaces/_numpy_random.py

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,14 @@ class RandomState(
4242
4343
For full documentation refer to `numpy.random.RandomState`.
4444
45-
.. note::
46-
*Compatibility Notice*
47-
48-
While this class shares its API with the original `RandomState`, it has
49-
been rewritten to use MKL's vector statistics functionality, that
50-
provides efficient implementation of the MT19937.
51-
As a consequence, this version is NOT seed-compatible with the original
52-
`RandomState` and the result of `get_state` is NOT compatible with the
53-
original `RandomState`
45+
Notes
46+
-----
47+
While this class shares its API with the original `RandomState`, it has
48+
been rewritten to use MKL's vector statistics functionality, that
49+
provides efficient implementation of the MT19937.
50+
As a consequence, this version is NOT seed-compatible with the original
51+
`RandomState` and the result of `get_state` is NOT compatible with the
52+
original `RandomState`
5453
5554
References
5655
-----
@@ -88,31 +87,29 @@ def get_state(self, legacy=True):
8887
out : {tuple(str, bytes), dict}
8988
The returned tuple has the following items:
9089
91-
1. a string specifying the basic psedo-random number generation
90+
1. a string specifying the basic pseudo-random number generation
9291
algorithm. It should always be `MT19937` for this class.
9392
2. a bytes object holding content of Intel MKL's stream for the
9493
generator.
9594
9695
If `legacy` is False, a dictionary containing the state information
9796
is returned instead, with the following keys:
9897
99-
1. `bit_generator`: a string specifying the basic psedo-random
98+
1. `bit_generator`: a string specifying the basic pseudo-random
10099
number generation algorithm. It should always be `MT19937`
101100
for this class.
102101
2. `state`: a dictionary guaranteed to contain the key
103-
`mkl_stream`, whose value is a bytes object holding content of
104-
Intel MKL's stream for the generator.
102+
`mkl_stream`, whose value is a bytes object holding content of
103+
Intel MKL's stream for the generator.
105104
106105
Compare with `numpy.random.get_state`.
107106
108-
.. note::
109-
*Compatibility Notice*
110-
107+
Notes
108+
-----
111109
As this class uses MKL in the backend, the state format is NOT
112110
compatible with the original `numpy.random.set_state`. The returned
113111
state represents the MKL stream state as a bytes object, which
114112
CANNOT be interpreted by NumPy's `RandomState`.
115-
116113
The `legacy` argument is included for compatibility with the
117114
original `RandomState`.
118115
"""
@@ -126,12 +123,11 @@ def set_state(self, state):
126123
127124
For full documentation refer to `numpy.random.set_state`.
128125
129-
.. note::
130-
*Compatibility Notice*
131-
132-
As this class uses MKL in the backend, the state of the generator
133-
is NOT deterministic with states returned from the original
134-
`numpy.random.get_state`.
126+
Notes
127+
-----
128+
As this class uses MKL in the backend, the state of the generator
129+
is NOT deterministic with states returned from the original
130+
`numpy.random.get_state`.
135131
136132
"""
137133
return super().set_state(state=state)

mkl_random/mklrand.pyx

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1655,7 +1655,7 @@ cdef class _MKLRandomState:
16551655
out : {tuple(str, bytes), dict}
16561656
The returned tuple has the following items:
16571657
1658-
1. a string specifying the basic psedo-random number generation
1658+
1. a string specifying the basic pseudo-random number generation
16591659
algorithm.
16601660
2. a bytes object holding content of Intel MKL's stream for the
16611661
given BRNG.
@@ -1711,7 +1711,7 @@ cdef class _MKLRandomState:
17111711
state : {tuple(str, bytes), dict}
17121712
The `state` tuple has the following items:
17131713
1714-
1. a string specifying the basic psedo-random number generation
1714+
1. a string specifying the basic pseudo-random number generation
17151715
algorithm.
17161716
2. a bytes object holding content of Intel MKL's stream for the
17171717
given BRNG.
@@ -6677,17 +6677,6 @@ cdef class MKLRandomState(_MKLRandomState):
66776677
array filled with generated values is returned. If `size` is a tuple,
66786678
then an array with that shape is filled and returned.
66796679
6680-
.. note::
6681-
*Compatibility Notice*
6682-
6683-
While this class shares some similarities with the original
6684-
`RandomState`, it has been rewritten to use MKL's vector statistics
6685-
functionality, that provides efficient implementation of the MT19937
6686-
and many other basic psuedo-random number generation algorithms as well
6687-
as efficient sampling from other common statistical distributions. As a
6688-
consequence this version is NOT seed-compatible with the original
6689-
`RandomState`.
6690-
66916680
Parameters
66926681
----------
66936682
seed : {None, int, array_like}, optional
@@ -6711,6 +6700,14 @@ cdef class MKLRandomState(_MKLRandomState):
67116700
NumPy-aware, has the advantage that it provides a much larger number
67126701
of probability distributions to choose from.
67136702
6703+
While this class shares some similarities with the original
6704+
`RandomState`, it has been rewritten to use MKL's vector statistics
6705+
functionality, that provides efficient implementation of the MT19937
6706+
and many other basic psuedo-random number generation algorithms as well
6707+
as efficient sampling from other common statistical distributions. As a
6708+
consequence this version is NOT seed-compatible with the original
6709+
`RandomState`.
6710+
67146711
References
67156712
-----
67166713
MKL Documentation: https://www.intel.com/content/www/us/en/developer/tools/oneapi/onemkl.html # no-cython-lint

0 commit comments

Comments
 (0)