Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ift
NIFTy
Commits
35f2684c
Commit
35f2684c
authored
Apr 01, 2020
by
Martin Reinecke
Browse files
Merge branch 'randomstate2' into 'NIFTy_6'
improve docstrings See merge request
!436
parents
a0fa21d9
e837fc03
Pipeline
#71908
passed with stages
in 15 minutes and 7 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
nifty6/random.py
View file @
35f2684c
...
...
@@ -146,6 +146,11 @@ def push_sseq(sseq):
----------
sseq: SeedSequence
the SeedSequence object to be used from this point
Notes
-----
Make sure that every call to `push_sseq` has a matching call to
`pop_sseq`, otherwise the module's internal stack will grow indefinitely!
"""
_sseq
.
append
(
sseq
)
_rng
.
append
(
np
.
random
.
default_rng
(
_sseq
[
-
1
]))
...
...
@@ -161,6 +166,11 @@ def push_sseq_from_seed(seed):
----------
seed: int
the seed from which the new SeedSequence will be built
Notes
-----
Make sure that every call to `push_sseq_from_seed` has a matching call to
`pop_sseq`, otherwise the module's internal stack will grow indefinitely!
"""
_sseq
.
append
(
np
.
random
.
SeedSequence
(
seed
))
_rng
.
append
(
np
.
random
.
default_rng
(
_sseq
[
-
1
]))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment