Skip to content

Commit 5d44405

Browse files
authored
add more details about rng reasoning
1 parent 9656c9c commit 5d44405

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

examples/anonymize_dataset.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,10 @@
207207
# culture, like "42", or "1337". To obtain a truly random seed, you can paste
208208
# the following into your console:
209209
# ``python -c "import secrets; print(secrets.randbits(31))"``
210+
# Here, 31 bits correspond to the maximum seed "size" that the the legacy
211+
# ``RandomState`` by NumPy, which many scientific libraries still rely on,
212+
# can accept. For more information, see also this blog post on
213+
# `NumPy RNG best practices <https://blog.scientific-python.org/numpy/numpy-rng/>`_.
210214
#
211215
# .. note::
212216
# Passing ``random_state`` merely guarantees that subject IDs and time shift

0 commit comments

Comments
 (0)