-
Notifications
You must be signed in to change notification settings - Fork 93
/
_seed.py
37 lines (28 loc) · 832 Bytes
/
_seed.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
_DEFAULT_SEED = 5555
def get_seed():
"""Return the current random state seed used for dataset
generation.
Returns
-------
int
Current seed value.
See also
--------
set_seed: Change the default random seed value for datasets generation.
"""
global _DEFAULT_SEED
return _DEFAULT_SEED
def set_seed(s: int):
"""Change the default random seed value used for dataset generation.
This will change the behaviour of the Mackey-Glass and NARMA
timeseries generator (see :py:func:`mackey_glass` and :py:func:`narma`).
Parameters
----------
s : int
A random state generator numerical seed.
See also
--------
get_seed: Return the current random state seed used for dataset generation.
"""
global _DEFAULT_SEED
_DEFAULT_SEED = s