Skip to content

Commit

Permalink
Merge pull request #396 from bashtage/user-bit-gen-warning
Browse files Browse the repository at this point in the history
DOC: Add warning to UBG
  • Loading branch information
bashtage authored Oct 11, 2024
2 parents 7f2acc4 + f8a4c40 commit 4a0d0df
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions randomgen/wrapper.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,16 @@ cdef class UserBitGenerator(BitGenerator):
a single input. If not provided, getting the ``state`` property
will raise NotImplementedError.
Notes
-----
There is one key caveat when using a UserBitGenerator. The callable must run without
exceptions.
.. warning::
It is essential that the callable function runs without producing an Exception.
Exceptions will be silently ignored and the generator will produce incorrect
results.
Examples
--------
A generator that rotates across 4 values from random.org.
Expand Down

0 comments on commit 4a0d0df

Please sign in to comment.