diff options
author | Kevin Sheppard <kevin.k.sheppard@gmail.com> | 2019-05-23 11:11:59 +0100 |
---|---|---|
committer | mattip <matti.picus@gmail.com> | 2019-05-27 22:58:35 +0300 |
commit | 7c52c2810e20a9e483e564751b8e2342c97f56c2 (patch) | |
tree | a6de2e359d75a4a61e27ed1a5f3e3672386c3834 /numpy/random/dsfmt.pyx | |
parent | 9e5ae6156855e5a2e2edccaf0112362ecb6d31fc (diff) | |
download | numpy-7c52c2810e20a9e483e564751b8e2342c97f56c2.tar.gz |
DOC: Add __all__ and document lock
Add docstring for lock
Use __all__ to discuorage unless attributes from appearing
Diffstat (limited to 'numpy/random/dsfmt.pyx')
-rw-r--r-- | numpy/random/dsfmt.pyx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/numpy/random/dsfmt.pyx b/numpy/random/dsfmt.pyx index cd6d92153..ea77b7821 100644 --- a/numpy/random/dsfmt.pyx +++ b/numpy/random/dsfmt.pyx @@ -14,6 +14,8 @@ from .common cimport * from .distributions cimport bitgen_t from .entropy import random_entropy +__all__ = ['DSFMT'] + np.import_array() DEF DSFMT_MEXP = 19937 @@ -83,6 +85,14 @@ cdef class DSFMT: ``/dev/urandom`` (or the Windows analog) if available. If unavailable, a 32-bit hash of the time and process ID is used. + Attributes + ---------- + lock: threading.Lock + Lock instance that is shared so that the same bit git generator can + be used in multiple Generators without corrupting the state. Code that + generates values from a bit generator should hold the bit generator's + lock. + Notes ----- ``DSFMT`` provides a capsule containing function pointers that produce |