Skip to content

Commit e7963c5

Browse files
committed
change compatibility notice formatting
1 parent 3c3fd15 commit e7963c5

File tree

1 file changed

+26
-19
lines changed

1 file changed

+26
-19
lines changed

mkl_random/interfaces/_numpy_random.py

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,14 +42,17 @@ class RandomState(
4242
4343
For full documentation refer to `numpy.random.RandomState`.
4444
45-
*Compatibility Notice*
46-
While this class shares some similarities with the original `RandomState`,
47-
it has been rewritten to use MKL's vector statistics functionality, that
48-
provides efficient implementation of the MT19937.
49-
As consequences:
50-
this version is NOT seed-compatible with the original `RandomState`.
51-
the result of `get_state` is NOT compatible with the original
52-
`RandomState`
45+
.. note::
46+
*Compatibility Notice*
47+
48+
While this class shares some similarities with the original
49+
`RandomState`, it has been rewritten to use MKL's vector statistics
50+
functionality, that provides efficient implementation of the MT19937.
51+
As consequences:
52+
this version is NOT seed-compatible with the original
53+
`RandomState`.
54+
the result of `get_state` is NOT compatible with the original
55+
`RandomState`
5356
5457
References
5558
-----
@@ -103,14 +106,16 @@ def get_state(self, legacy=True):
103106
104107
Compare with `numpy.random.get_state`.
105108
106-
*Compatibility Notice*
107-
As this class uses MKL in the backend, the state format is NOT
108-
compatible with the original `numpy.random.set_state`. The returned
109-
state represents the MKL stream state as a bytes object, which CANNOT
110-
be interpreted by NumPy's `RandomState`.
109+
.. note::
110+
*Compatibility Notice*
111111
112-
The `legacy` argument is included for compatibility with the original
113-
`RandomState`.
112+
As this class uses MKL in the backend, the state format is NOT
113+
compatible with the original `numpy.random.set_state`. The returned
114+
state represents the MKL stream state as a bytes object, which
115+
CANNOT be interpreted by NumPy's `RandomState`.
116+
117+
The `legacy` argument is included for compatibility with the
118+
original `RandomState`.
114119
"""
115120
return super().get_state(legacy=legacy)
116121

@@ -122,10 +127,12 @@ def set_state(self, state):
122127
123128
For full documentation refer to `numpy.random.set_state`.
124129
125-
*Compatibility Notice*
126-
As this class uses MKL in the backend, the state of the generator is
127-
NOT deterministic with states returned from the original
128-
`numpy.random.get_state`.
130+
.. note::
131+
*Compatibility Notice*
132+
133+
As this class uses MKL in the backend, the state of the generator
134+
is NOT deterministic with states returned from the original
135+
`numpy.random.get_state`.
129136
130137
"""
131138
return super().set_state(state=state)

0 commit comments

Comments
 (0)