Skip to content

Commit

Permalink
Note on use of np.random.seed in genedrop functions
Browse files Browse the repository at this point in the history
  • Loading branch information
timothymillar authored and mergify[bot] committed Dec 4, 2023
1 parent fadb87c commit 2ab47b5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sgkit/stats/genedrop_numba_fns.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@

from .pedigree import _compress_hamilton_kerr_parameters, topological_argsort

# NOTE: The use of `np.random.seed()` within numba compiled functions should not
# affect numpy RNG. The numba implementation is thread safe (since version 0.28.0)
# and each thread/process will produce an independent stream of random numbers.
# See https://numba.pydata.org/numba-doc/dev/reference/numpysupported.html#random.


@numba_guvectorize( # type: ignore
[
Expand Down

0 comments on commit 2ab47b5

Please sign in to comment.