Skip to content

Commit 2ab47b5

Browse files
timothymillarmergify[bot]
authored andcommitted
Note on use of np.random.seed in genedrop functions
1 parent fadb87c commit 2ab47b5

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sgkit/stats/genedrop_numba_fns.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55

66
from .pedigree import _compress_hamilton_kerr_parameters, topological_argsort
77

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

914
@numba_guvectorize( # type: ignore
1015
[

0 commit comments

Comments
 (0)